aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChimrod <>2024-02-04 10:37:04 +0100
committerChimrod <>2024-02-08 14:12:45 +0100
commit6fd720c07e3e361932e01bfbdbe4637c8f610649 (patch)
tree26f983295d8674a08fc9367aaac820c0ace675bc /test
parent35ef1827a216a1deb6d15f916ff197b0c75bc83e (diff)
Added a general context for each test
Diffstat (limited to 'test')
-rw-r--r--test/make_checkTest.ml3
-rw-r--r--test/syntax.ml3
2 files changed, 4 insertions, 2 deletions
diff --git a/test/make_checkTest.ml b/test/make_checkTest.ml
index 2066c22..d428b45 100644
--- a/test/make_checkTest.ml
+++ b/test/make_checkTest.ml
@@ -26,7 +26,8 @@ module M (Check : Qsp_syntax.S.Analyzer) = struct
let lexing =
Sedlexing.Latin1.from_string content |> Qparser.Lexbuf.from_lexbuf
in
- Qparser.Analyzer.parse (module Check) lexing
+ let context = Check.initialize () in
+ Qparser.Analyzer.parse (module Check) lexing context
let get_report :
(Check.Location.t * Qsp_syntax.Report.t list, Qsp_syntax.Report.t) result ->
diff --git a/test/syntax.ml b/test/syntax.ml
index 47f1a25..87fe2ab 100644
--- a/test/syntax.ml
+++ b/test/syntax.ml
@@ -27,7 +27,8 @@ let parse : string -> (S.pos location, Qsp_syntax.Report.t) result =
let lexing =
Sedlexing.Latin1.from_string content |> Qparser.Lexbuf.from_lexbuf
in
- Qparser.Analyzer.parse (module Parser) lexing
+ let context = Parser.initialize () in
+ Qparser.Analyzer.parse (module Parser) lexing context
|> Result.map (fun (location, _report) ->
(* Uncatched excteptions here, but we are in the tests…
If it’s fail here I have an error in the code. *)