aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-05-02 18:58:39 +0200
committerPierre-Marie Pédrot2020-05-03 13:09:50 +0200
commit4add482cfde2e3734be567c9824b2774871deb52 (patch)
treed0b3a99679aeb0781b4164a1674a189614244299
parent596963894ce798d7515fea4a317c074c718c16df (diff)
Add tests uncovered during bug chasing in the CI.
-rw-r--r--test-suite/ssr/simpl_done.v28
-rw-r--r--test-suite/ssr/try_case.v11
2 files changed, 39 insertions, 0 deletions
diff --git a/test-suite/ssr/simpl_done.v b/test-suite/ssr/simpl_done.v
new file mode 100644
index 0000000000..f5c766209a
--- /dev/null
+++ b/test-suite/ssr/simpl_done.v
@@ -0,0 +1,28 @@
+Require Import ssreflect.
+
+Inductive lit : Set :=
+| LitP : lit
+| LitL : lit
+.
+
+Inductive val : Set :=
+| Val : lit -> val.
+
+Definition tyref :=
+fun (vl : list val) =>
+match vl with
+| cons (Val LitL) (cons (Val LitP) _) => False
+| _ => False
+end.
+
+(** Check that simplification and resolution are performed in the right order
+ by "//=" when several goals are under focus. *)
+Goal exists vl1 : list val,
+ cons (Val LitL) (cons (Val LitL) nil) = vl1 /\
+ (tyref vl1)
+.
+Proof.
+eexists (cons _ (cons _ _)).
+split =>//=.
+Fail progress simpl.
+Abort.
diff --git a/test-suite/ssr/try_case.v b/test-suite/ssr/try_case.v
new file mode 100644
index 0000000000..114bf2cecf
--- /dev/null
+++ b/test-suite/ssr/try_case.v
@@ -0,0 +1,11 @@
+From Coq Require Import ssreflect.
+
+Axiom T : Type.
+Axiom R : T -> T -> Type.
+
+(** Check that internal exceptions are correctly caught in the monad *)
+Goal forall (a b : T) (Hab : R a b), True.
+Proof.
+intros.
+try (case: Hab).
+Abort.