adding futher unit tests with alcotest
This commit is contained in:
parent
34ccc51b79
commit
8f3ec93f82
15
test/test_ast.ml
Normal file
15
test/test_ast.ml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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
|
Loading…
Reference in New Issue
Block a user