From 65164f2ebe61a566d96119c2cde23eee6771007b Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 9 Dec 2024 10:13:50 +0100 Subject: Splitted the code and declare the test catalog in it’s own module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/syntax.ml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'test/syntax.ml') diff --git a/test/syntax.ml b/test/syntax.ml index 1123101..db449b1 100644 --- a/test/syntax.ml +++ b/test/syntax.ml @@ -4,7 +4,7 @@ module Check = Qsp_checks.Check module S = Qsp_syntax.S module T = Qsp_syntax.T -let location_id, e1 = Check.build (module Tree) +let location_id, e1 = Qsp_syntax.Catalog.build (module Tree) module Parser = Check.Make (struct let t = [| e1 |] @@ -413,7 +413,7 @@ let test_comment_string () = () (** This test ensure that the unary operator is applied to the whole expression - *) +*) let test_precedence () = let index = None in let x = Ast.Ident { Ast.pos = _position; name = "X"; index } @@ -421,8 +421,7 @@ let test_precedence () = _test_instruction "no x = y" Ast.[ Expression (Op (_position, No, BinaryOp (_position, Eq, x, y))) ] -(** This test ensure that a ! is not considered as a comment in an - expression *) +(** This test ensure that a ! is not considered as a comment in an expression *) let test_precedence2 () = let index = None in let x = { Ast.pos = _position; name = "X"; index } @@ -750,8 +749,8 @@ let test_precedence6 () = Ast.Integer (_position, "3") ) )); ] -(** An identifier cannot start by a number *0 is a product and not an - identifier *) +(** An identifier cannot start by a number *0 is a product and not an identifier +*) let test_operator () = let index = None in let a = { Ast.pos = _position; name = "A"; index } @@ -777,10 +776,9 @@ let test_dyneval () = ] (** The parens after input are considered as arguments for the function, not a - following expression. + following expression. - This expression is a boolean. -*) + This expression is a boolean. *) let test_input () = _test_instruction "( input('') = '' )" [ @@ -868,7 +866,7 @@ let test_precedence8 () = Tree.Ast.Integer (_position, "1") ) )); ] -(** Test showing the - should be considered as an operator and cannot be +(** Test showing the - should be considered as an operator and cannot be aggregated inside the integer value. *) let minus_operator () = _test_instruction {|day-7|} -- cgit v1.2.3