MCPcopy
hub / github.com/kashav/fsql / TestTokenizer_ReadWord

Function TestTokenizer_ReadWord

tokenizer/tokenizer_test.go:149–167  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

147}
148
149func TestTokenizer_ReadWord(t *testing.T) {
150 type Case struct {
151 input string
152 expected string
153 }
154
155 cases := []Case{
156 {input: "foo", expected: "foo"},
157 {input: "foo bar", expected: "foo"},
158 {input: "", expected: ""},
159 }
160
161 for _, c := range cases {
162 actual := NewTokenizer(c.input).readWord()
163 if !reflect.DeepEqual(actual, c.expected) {
164 t.Fatalf("\nExpected: %v\n Got: %v", c.expected, actual)
165 }
166 }
167}
168
169func TestTokenizer_ReadQuery(t *testing.T) {
170 type Case struct {

Callers

nothing calls this directly

Calls 2

NewTokenizerFunction · 0.85
readWordMethod · 0.80

Tested by

no test coverage detected