aboutsummaryrefslogtreecommitdiff
path: root/test/location.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/location.ml')
-rw-r--r--test/location.ml14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/location.ml b/test/location.ml
index a1939f4..decf270 100644
--- a/test/location.ml
+++ b/test/location.ml
@@ -5,7 +5,7 @@ let _position = (Lexing.dummy_pos, Lexing.dummy_pos)
let error_message =
[
( "Location",
- Check.
+ Make_checkTest.
{
level = Error;
loc = _position;
@@ -18,11 +18,21 @@ let ok_upper () = Check.global_check "gt 'LOCATION'" []
let missing_gt () = Check.global_check "gt 'unknown_place'" error_message
let missing_gs () = Check.global_check "gs 'unknown_place'" error_message
+let act_missing_gs () =
+ Check.global_check {|
+act "test": gs 'unknown_place'|} error_message
+
+let if_missing_gs () =
+ Check.global_check {|
+ if 0: gs 'unknown_place'|} error_message
+
let test =
- ( "Locations",
+ ( __FILE__,
[
Alcotest.test_case "Ok" `Quick ok;
Alcotest.test_case "Ok upper" `Quick ok_upper;
Alcotest.test_case "Missing GT" `Quick missing_gt;
Alcotest.test_case "Missing GS" `Quick missing_gs;
+ Alcotest.test_case "Missing GS in block" `Quick act_missing_gs;
+ Alcotest.test_case "Missing GS in block'" `Quick if_missing_gs;
] )