TestKeywords_IsCompoundKeyword tests the IsCompoundKeyword method
(t *testing.T)
| 240 | |
| 241 | // TestKeywords_IsCompoundKeyword tests the IsCompoundKeyword method |
| 242 | func TestKeywords_IsCompoundKeyword(t *testing.T) { |
| 243 | k := NewKeywords() |
| 244 | tests := []struct { |
| 245 | word string |
| 246 | expected bool |
| 247 | }{ |
| 248 | {"GROUP BY", true}, |
| 249 | {"ORDER BY", true}, |
| 250 | {"LEFT JOIN", true}, |
| 251 | {"FULL JOIN", true}, |
| 252 | {"CROSS JOIN", true}, |
| 253 | {"NATURAL JOIN", true}, |
| 254 | {"SELECT", false}, |
| 255 | {"NOTCOMPOUND", false}, |
| 256 | {"", false}, |
| 257 | } |
| 258 | |
| 259 | for _, tt := range tests { |
| 260 | if got := k.IsCompoundKeyword(tt.word); got != tt.expected { |
| 261 | t.Errorf("IsCompoundKeyword(%q) = %v, want %v", tt.word, got, tt.expected) |
| 262 | } |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | // TestKeywords_GetCompoundKeywordType tests the GetCompoundKeywordType method |
| 267 | func TestKeywords_GetCompoundKeywordType(t *testing.T) { |
nothing calls this directly
no test coverage detected