diff options
| author | Gaëtan Gilbert | 2021-04-06 13:26:31 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2021-04-14 12:54:40 +0200 |
| commit | 8df5a37d934b4f862a6183ee451c6bb34ae72d94 (patch) | |
| tree | 55ed37eddbae7e33f9d77c21cf4cdcb2268f1f3c /test-suite/misc | |
| parent | 9f155567b48c1f61eedbe1da0adae74cebd62a8b (diff) | |
Add test for -schedule-vio-checking
Close #14074
Diffstat (limited to 'test-suite/misc')
| -rwxr-xr-x | test-suite/misc/vio_checking.sh | 32 | ||||
| -rw-r--r-- | test-suite/misc/vio_checking.v | 9 | ||||
| -rw-r--r-- | test-suite/misc/vio_checking_bad.v | 4 |
3 files changed, 45 insertions, 0 deletions
diff --git a/test-suite/misc/vio_checking.sh b/test-suite/misc/vio_checking.sh new file mode 100755 index 0000000000..ffa909e93b --- /dev/null +++ b/test-suite/misc/vio_checking.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -ex + +export COQBIN=$BIN +export PATH=$COQBIN:$PATH + +cd misc + +rm -f vio_checking{,bad}.{vo,vio} + +coqc -vio vio_checking.v +coqc -vio vio_checking_bad.v + +coqc -schedule-vio-checking 2 vio_checking.vio + +if coqc -schedule-vio-checking 2 vio_checking_bad.vio; then + echo 'vio-checking on vio_checking_bad.vio should have failed!' + exit 1 +fi +if coqc -schedule-vio-checking 2 vio_checking.vio vio_checking_bad.vio; then + echo 'vio-checking on vio_checking vio_checking_bad.vio should have failed!' + exit 1 +fi + +coqc -vio2vo vio_checking.vio +coqchk -silent vio_checking.vo + +if coqc -vio2vo vio_checking_bad.vio; then + echo 'vio2vo on vio_checking_bad.vio should have failed!' + exit 1 +fi diff --git a/test-suite/misc/vio_checking.v b/test-suite/misc/vio_checking.v new file mode 100644 index 0000000000..8dd5e47383 --- /dev/null +++ b/test-suite/misc/vio_checking.v @@ -0,0 +1,9 @@ + +Lemma foo : Type. +Proof. exact Type. Qed. + +Lemma foo1 : Type. +Proof. exact Type. Qed. + +Lemma foo2 : Type. +Proof. exact foo1. Qed. diff --git a/test-suite/misc/vio_checking_bad.v b/test-suite/misc/vio_checking_bad.v new file mode 100644 index 0000000000..f32d06f34a --- /dev/null +++ b/test-suite/misc/vio_checking_bad.v @@ -0,0 +1,4 @@ +(* a file to check that vio-checking is not a noop *) + +Lemma foo : Type. +Proof. match goal with |- ?G => exact G end. Qed. |
