aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-10-25 07:36:43 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-10-25 07:36:43 +0000
commitb02da518c51456b003c61f9775050fbfe6090629 (patch)
treefd9d603b8829a6dfa1190ae111e84b136be59060 /test-suite
parent28623d59a6381c7fb1c198ddca2dc382ba5c0e4c (diff)
Improved the treatment of Local/Global options (noneffective Local on
Implicit Arguments, Arguments Scope and Coercion fixed, noneffective Global in sections for Hints and Notation detected). Misc. improvements (comments + interpretation of Hint Constructors + dev printer for hint_db). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12411 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rwxr-xr-xtest-suite/check4
-rw-r--r--test-suite/failure/ImportedCoercion.v7
-rw-r--r--test-suite/prerequisite/make_local.v10
-rw-r--r--test-suite/success/Import.v11
-rw-r--r--test-suite/success/Notations.v2
5 files changed, 31 insertions, 3 deletions
diff --git a/test-suite/check b/test-suite/check
index a73654bcd..efac178c0 100755
--- a/test-suite/check
+++ b/test-suite/check
@@ -3,9 +3,9 @@
# Automatic test of Coq
if [ "$1" = -byte ]; then
- coqtop="../bin/coqtop.byte -boot -q -batch"
+ coqtop="../bin/coqtop.byte -boot -q -batch -I prerequisite"
else
- coqtop="../bin/coqtop -boot -q -batch"
+ coqtop="../bin/coqtop -boot -q -batch -I prerequisite"
fi
command="$coqtop -top Top -load-vernac-source"
diff --git a/test-suite/failure/ImportedCoercion.v b/test-suite/failure/ImportedCoercion.v
new file mode 100644
index 000000000..0a69b8517
--- /dev/null
+++ b/test-suite/failure/ImportedCoercion.v
@@ -0,0 +1,7 @@
+(* Test visibility of coercions *)
+
+Require Import make_local.
+
+(* Local coercion must not be used *)
+
+Check (0 = true).
diff --git a/test-suite/prerequisite/make_local.v b/test-suite/prerequisite/make_local.v
new file mode 100644
index 000000000..cdb7a2691
--- /dev/null
+++ b/test-suite/prerequisite/make_local.v
@@ -0,0 +1,10 @@
+(* Used in Import.v to test the locality flag *)
+
+Definition f (A:Type) (a:A) := a.
+
+Local Arguments Scope f [type_scope type_scope].
+Local Implicit Arguments f [A].
+
+(* Used in Import.v to test the locality flag *)
+
+Local Coercion g (b:bool) := if b then 0 else 1.
diff --git a/test-suite/success/Import.v b/test-suite/success/Import.v
new file mode 100644
index 000000000..ff5c1ed75
--- /dev/null
+++ b/test-suite/success/Import.v
@@ -0,0 +1,11 @@
+(* Test visibility of imported objects *)
+
+Require Import make_local.
+
+(* Check local implicit arguments are not imported *)
+
+Check (f nat 0).
+
+(* Check local arguments scopes are not imported *)
+
+Check (f nat (0*0)).
diff --git a/test-suite/success/Notations.v b/test-suite/success/Notations.v
index b09c6c9a7..7d7bcc71e 100644
--- a/test-suite/success/Notations.v
+++ b/test-suite/success/Notations.v
@@ -30,7 +30,7 @@ Notation "' 'C_' G ( A )" := (A,G) (at level 8, G at level 2).
(* Check import of notations from within a section *)
Notation "+1 x" := (S x) (at level 25, x at level 9).
-Section A. Global Notation "'Z'" := O (at level 9). End A.
+Section A. Require Import make_notation. End A.
(* Check use of "$" (see bug #1961) *)