(t *testing.T)
| 58 | } |
| 59 | |
| 60 | func TestParseBytes(t *testing.T) { |
| 61 | result, err := parser.ParseBytes([]byte("SELECT * FROM users")) |
| 62 | if err != nil { |
| 63 | t.Fatalf("ParseBytes failed: %v", err) |
| 64 | } |
| 65 | defer ast.ReleaseAST(result) |
| 66 | |
| 67 | if len(result.Statements) != 1 { |
| 68 | t.Fatalf("expected 1 statement, got %d", len(result.Statements)) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func TestParseBytesInvalid(t *testing.T) { |
| 73 | _, err := parser.ParseBytes([]byte("SELECT FROM WHERE")) |
nothing calls this directly
no test coverage detected