aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/bug_13960.v10
-rw-r--r--test-suite/ltac2/syntax_cast.v14
-rw-r--r--test-suite/output/ltac2_deprecated.out12
-rw-r--r--test-suite/output/ltac2_deprecated.v15
4 files changed, 51 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_13960.v b/test-suite/bugs/closed/bug_13960.v
new file mode 100644
index 0000000000..947db9586f
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13960.v
@@ -0,0 +1,10 @@
+Require Ltac2.Ltac2.
+
+Set Default Goal Selector "!".
+
+Ltac2 t () := let _ := Message.print (Message.of_string "hi") in 42.
+
+Goal False.
+Proof.
+Ltac2 Eval t ().
+Abort.
diff --git a/test-suite/ltac2/syntax_cast.v b/test-suite/ltac2/syntax_cast.v
new file mode 100644
index 0000000000..f62d49173d
--- /dev/null
+++ b/test-suite/ltac2/syntax_cast.v
@@ -0,0 +1,14 @@
+Require Import Ltac2.Ltac2.
+
+Ltac2 foo0 x y : unit := ().
+Ltac2 foo1 : unit := ().
+Fail Ltac2 foo2 : unit -> unit := ().
+Ltac2 foo3 : unit -> unit := fun (_ : unit) => ().
+
+Ltac2 bar0 := fun x y : unit => ().
+Fail Ltac2 bar1 := fun x : unit => 0.
+Ltac2 bar2 := fun x : unit list => [].
+
+Ltac2 qux0 := let x : unit := () in ().
+Ltac2 qux1 () := let x y z : unit := () in x 0 "".
+Fail Ltac2 qux2 := let x : unit -> unit := () in ().
diff --git a/test-suite/output/ltac2_deprecated.out b/test-suite/output/ltac2_deprecated.out
new file mode 100644
index 0000000000..d17b719bcd
--- /dev/null
+++ b/test-suite/output/ltac2_deprecated.out
@@ -0,0 +1,12 @@
+File "stdin", line 13, characters 11-14:
+Warning: Ltac2 definition foo is deprecated. test_definition
+[deprecated-ltac2-definition,deprecated]
+- : unit = ()
+File "stdin", line 14, characters 11-14:
+Warning: Ltac2 alias bar is deprecated. test_notation
+[deprecated-ltac2-alias,deprecated]
+- : unit = ()
+File "stdin", line 15, characters 11-14:
+Warning: Ltac2 definition qux is deprecated. test_external
+[deprecated-ltac2-definition,deprecated]
+- : 'a array -> int = <fun>
diff --git a/test-suite/output/ltac2_deprecated.v b/test-suite/output/ltac2_deprecated.v
new file mode 100644
index 0000000000..9598a5979c
--- /dev/null
+++ b/test-suite/output/ltac2_deprecated.v
@@ -0,0 +1,15 @@
+Require Import Ltac2.Ltac2.
+
+#[deprecated(note="test_definition")]
+Ltac2 foo := ().
+
+#[deprecated(note="test_notation")]
+Ltac2 Notation bar := ().
+
+#[deprecated(note="test_external")]
+Ltac2 @ external qux : 'a array -> int := "ltac2" "array_length".
+(* Randomly picked external function *)
+
+Ltac2 Eval foo.
+Ltac2 Eval bar.
+Ltac2 Eval qux.