(t *testing.T)
| 147 | } |
| 148 | |
| 149 | func 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 | |
| 169 | func TestTokenizer_ReadQuery(t *testing.T) { |
| 170 | type Case struct { |
nothing calls this directly
no test coverage detected