Browse Source

Fixed naming in tests

tags/v0.6.0
Martin Evans 2 years ago
parent
commit
3f082c6f2c
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      LLama.Unittest/TokenTests.cs

+ 8
- 8
LLama.Unittest/TokenTests.cs View File

@@ -29,13 +29,13 @@ public class TokenTests
{ {
var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8); var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8);


var resultTrue = tokens.TokensEndsWithAnyString(new[]
var result = tokens.TokensEndsWithAnyString(new[]
{ {
"a fish", "a fish",
"the mat", "the mat",
"this is an improbably long query to be using for this method" "this is an improbably long query to be using for this method"
}, _model.NativeHandle, Encoding.UTF8); }, _model.NativeHandle, Encoding.UTF8);
Assert.True(resultTrue);
Assert.True(result);
} }


[Fact] [Fact]
@@ -43,11 +43,11 @@ public class TokenTests
{ {
var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8); var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8);


var resultTrue = tokens.TokensEndsWithAnyString(new[]
var result = tokens.TokensEndsWithAnyString(new[]
{ {
"at", "at",
}, _model.NativeHandle, Encoding.UTF8); }, _model.NativeHandle, Encoding.UTF8);
Assert.True(resultTrue);
Assert.True(result);
} }


[Fact] [Fact]
@@ -55,13 +55,13 @@ public class TokenTests
{ {
var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8); var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8);


var resultTrue = tokens.TokensEndsWithAnyString(new[]
var result = tokens.TokensEndsWithAnyString(new[]
{ {
"a fish", "a fish",
"The cat sat on the edge of the ma", "The cat sat on the edge of the ma",
"this is an improbably long query to be using for this method" "this is an improbably long query to be using for this method"
}, _model.NativeHandle, Encoding.UTF8); }, _model.NativeHandle, Encoding.UTF8);
Assert.False(resultTrue);
Assert.False(result);
} }


[Fact] [Fact]
@@ -69,7 +69,7 @@ public class TokenTests
{ {
var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8); var tokens = _model.NativeHandle.Tokenize("The cat sat on the edge of the mat", false, Encoding.UTF8);


var resultTrue = tokens.TokensEndsWithAnyString(Array.Empty<string>(), _model.NativeHandle, Encoding.UTF8);
Assert.False(resultTrue);
var result = tokens.TokensEndsWithAnyString(Array.Empty<string>(), _model.NativeHandle, Encoding.UTF8);
Assert.False(result);
} }
} }

Loading…
Cancel
Save