aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/bug_13059.v31
-rw-r--r--test-suite/bugs/closed/bug_13109.v24
-rw-r--r--test-suite/bugs/closed/bug_2928.v11
-rwxr-xr-xtest-suite/misc/coq_makefile_destination_of.sh26
-rw-r--r--test-suite/output/UnivBinders.out6
-rw-r--r--test-suite/output/bug_12908.out2
-rw-r--r--test-suite/output/bug_12908.v6
7 files changed, 92 insertions, 14 deletions
diff --git a/test-suite/bugs/closed/bug_13059.v b/test-suite/bugs/closed/bug_13059.v
new file mode 100644
index 0000000000..2416e3ad13
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13059.v
@@ -0,0 +1,31 @@
+Set Uniform Inductive Parameters.
+Inductive test (X : Set) : Prop :=
+with test2 (X : Set) : X -> Prop :=
+ | C (x : X) : test2 x.
+
+Require Import List.
+Import ListNotations.
+
+Set Suggest Proof Using.
+Set Primitive Projections.
+
+
+Section Grammar.
+Variable A : Type.
+
+Record grammar : Type := Grammar {
+ gm_nonterm :> Type ;
+ gm_rules :> list (gm_nonterm * list (A + gm_nonterm)) ;
+}.
+
+Set Uniform Inductive Parameters.
+Inductive lang (gm : grammar) : gm -> list A -> Prop :=
+| lang_rule S ps ws : In (S, ps) gm -> lmatch ps ws -> lang S (concat ws)
+with lmatch (gm : grammar) : list (A + gm) -> list (list A) -> Prop :=
+| lmatch_nil : lmatch [] []
+| lmatch_consL ps ws a : lmatch ps ws -> lmatch (inl a :: ps) ([a] :: ws)
+| lmatch_consR ps ws S w :
+ lang S w -> lmatch ps ws -> lmatch (inr S :: ps) (w :: ws)
+.
+
+End Grammar.
diff --git a/test-suite/bugs/closed/bug_13109.v b/test-suite/bugs/closed/bug_13109.v
new file mode 100644
index 0000000000..76511a44c5
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13109.v
@@ -0,0 +1,24 @@
+Require Import Coq.Program.Tactics.
+
+Set Universe Polymorphism.
+Obligation Tactic := idtac.
+
+Program Definition foo : Type := _.
+Program Definition bar : Type := _.
+Admit Obligations.
+(* Error: Anomaly "Uncaught exception AcyclicGraph.Make(Point).AlreadyDeclared."
+Please report at http://coq.inria.fr/bugs/.
+ *)
+Print foo.
+Print foo_obligation_1.
+Print bar.
+Print bar_obligation_1.
+
+Program Definition baz : Type := _.
+Admit Obligations of baz.
+Print baz.
+Print baz_obligation_1.
+
+Admit Obligations.
+
+Fail Admit Obligations of nobody.
diff --git a/test-suite/bugs/closed/bug_2928.v b/test-suite/bugs/closed/bug_2928.v
deleted file mode 100644
index 21e92ae20c..0000000000
--- a/test-suite/bugs/closed/bug_2928.v
+++ /dev/null
@@ -1,11 +0,0 @@
-Class Equiv A := equiv: A -> A -> Prop.
-Infix "=" := equiv : type_scope.
-
-Class Associative {A} f `{Equiv A} := associativity x y z : f x (f y z) = f (f x y) z.
-
-Class SemiGroup A op `{Equiv A} := { sg_ass :>> Associative op }.
-
-Class SemiLattice A op `{Equiv A} :=
- { semilattice_sg :>> SemiGroup A op
- ; redundant : Associative op
- }.
diff --git a/test-suite/misc/coq_makefile_destination_of.sh b/test-suite/misc/coq_makefile_destination_of.sh
new file mode 100755
index 0000000000..fc8e089ccf
--- /dev/null
+++ b/test-suite/misc/coq_makefile_destination_of.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+export COQBIN=$BIN
+export PATH=$COQBIN:$PATH
+
+TMP=`mktemp -d`
+cd $TMP
+
+function assert_eq() {
+ if [ "$1" != "$2" ]; then
+ echo "coq_makefile generates destination" $1 "!=" $2
+ cd /
+ rm -rf $TMP
+ exit 1
+ fi
+}
+
+assert_eq `coq_makefile -destination-of src/Y/Z/Test.v -Q src X` "X//Y/Z"
+mkdir src
+assert_eq `coq_makefile -destination-of src/Y/Z/Test.v -Q src X` "X//Y/Z"
+mkdir -p src/Y/Z
+touch src/Y/Z/Test.v
+assert_eq `coq_makefile -destination-of src/Y/Z/Test.v -Q src X` "X//Y/Z"
+cd /
+rm -rf $TMP
+exit 0
diff --git a/test-suite/output/UnivBinders.out b/test-suite/output/UnivBinders.out
index 163ed15606..d8d3f696b7 100644
--- a/test-suite/output/UnivBinders.out
+++ b/test-suite/output/UnivBinders.out
@@ -67,9 +67,9 @@ mono
The command has indeed failed with message:
Universe u already exists.
bobmorane =
-let tt := Type@{UnivBinders.33} in
-let ff := Type@{UnivBinders.35} in tt -> ff
- : Type@{max(UnivBinders.32,UnivBinders.34)}
+let tt := Type@{UnivBinders.32} in
+let ff := Type@{UnivBinders.34} in tt -> ff
+ : Type@{max(UnivBinders.31,UnivBinders.33)}
The command has indeed failed with message:
Universe u already bound.
foo@{E M N} =
diff --git a/test-suite/output/bug_12908.out b/test-suite/output/bug_12908.out
new file mode 100644
index 0000000000..fca6dde704
--- /dev/null
+++ b/test-suite/output/bug_12908.out
@@ -0,0 +1,2 @@
+forall m n : nat, m * n = (2 * m * n)%nat
+ : Prop
diff --git a/test-suite/output/bug_12908.v b/test-suite/output/bug_12908.v
new file mode 100644
index 0000000000..558c9f9f6a
--- /dev/null
+++ b/test-suite/output/bug_12908.v
@@ -0,0 +1,6 @@
+Definition mult' m n := 2 * m * n.
+Module A.
+(* Test hiding of a scoped notation by a lonely notation *)
+Infix "*" := mult'.
+Check forall m n, mult' m n = Nat.mul (Nat.mul 2 m) n.
+End A.