aboutsummaryrefslogtreecommitdiff
path: root/test/nested_string.ml
blob: b121667f6f78d0806f236b9e5b77812bd49add35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module Check = Make_checkTest.M (Qsp_syntax.Nested_strings)

let _position = (Lexing.dummy_pos, Lexing.dummy_pos)

let _test_instruction : string -> Qsp_syntax.Report.t list -> unit =
  Check._test_instruction

let nothing () = _test_instruction {|
"value = <<$variable>>"
  |} []

let simple_expression () =
  _test_instruction {|"<<$variable>>"|}
    [
      {
        level = Debug;
        loc = _position;
        message = "This expression can be simplified";
      };
    ]

let test =
  ( "Nested_strings checker",
    [
      Alcotest.test_case "Ok" `Quick nothing;
      Alcotest.test_case "Simple expression" `Quick simple_expression;
    ] )