16 lines
302 B
OCaml
16 lines
302 B
OCaml
open Ast
|
|
|
|
let parse query =
|
|
let lexbuf = Lexing.from_string query in
|
|
Parser.main Lexer.read_token lexbuf
|
|
|
|
let equal_ast ast1 ast2 =
|
|
ast1 = ast2
|
|
|
|
let
|
|
|
|
let test_simple_select() =
|
|
let q1 = parse "SELECT a FROM t" in
|
|
let ast1 = Query(Select([Column("a")], [Table("t")])) in
|
|
Alcotest.(check
|