diff options
author | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2018-03-27 17:50:06 +0200 |
---|---|---|
committer | Sébastien Hinderer <Sebastien.Hinderer@inria.fr> | 2018-03-28 10:43:35 +0200 |
commit | 584c607d91a72e5dca650b79718bd62c22da1105 (patch) | |
tree | 06e517771a13d0bf33f92277d070a2566329bf34 | |
parent | 89b97c7479f6fe9feb742422dcb182588f948af5 (diff) | |
download | ocaml-584c607d91a72e5dca650b79718bd62c22da1105.tar.gz |
Migrate the typing-multifile tests to ocamltest
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/Makefile | 49 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/a.ml | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/b.ml | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/c.ml | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/d.mli | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/e.ml | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/f.ml | 4 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/ocamltests | 3 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/pr6372.ml | 9 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/pr7325.ml | 13 | ||||
-rw-r--r-- | testsuite/tests/typing-multifile/pr7563.ml | 5 |
12 files changed, 39 insertions, 58 deletions
diff --git a/.gitignore b/.gitignore index 95c37ca187..4f7aa6f546 100644 --- a/.gitignore +++ b/.gitignore @@ -314,15 +314,6 @@ _ocamltestd /testsuite/tests/tool-lexyacc/grammar.mli /testsuite/tests/tool-lexyacc/grammar.ml -/testsuite/tests/typing-multifile/a.ml -/testsuite/tests/typing-multifile/b.ml -/testsuite/tests/typing-multifile/c.ml -/testsuite/tests/typing-multifile/d.mli -/testsuite/tests/typing-multifile/e.ml -/testsuite/tests/typing-multifile/f.ml -/testsuite/tests/typing-multifile/g.ml -/testsuite/tests/typing-multifile/test - /testsuite/tests/typing-unboxed-types/false.flat-float /testsuite/tests/typing-unboxed-types/true.flat-float /testsuite/tests/typing-unboxed-types/test.ml.reference diff --git a/testsuite/tests/typing-multifile/Makefile b/testsuite/tests/typing-multifile/Makefile deleted file mode 100644 index efcadaf29c..0000000000 --- a/testsuite/tests/typing-multifile/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************** -#* * -#* OCaml * -#* * -#* Xavier Clerc, SED, INRIA Rocquencourt * -#* * -#* Copyright 2010 Institut National de Recherche en Informatique et * -#* en Automatique. * -#* * -#* All rights reserved. This file is distributed under the terms of * -#* the GNU Lesser General Public License version 2.1, with the * -#* special exception on linking described in the file LICENSE. * -#* * -#************************************************************************** - -BASEDIR=../.. -GENERATED= a.ml b.ml c.ml d.mli e.ml f.ml g.ml test - -default: pr7325 pr6372 pr7563 - -pr7325: - @printf " ... testing 'pr7325':" - @echo "type _ t = T" > a.ml - @echo "type 'a t = 'a A.t" > b.ml - @echo 'external f : unit -> unit B.t = "%identity"' > c.ml - @$(OCAMLC) -c a.ml b.ml && rm a.cmi && $(OCAMLC) -c c.ml \ - && echo " => passed" || echo " => failed" - -pr6372: - @printf " ... testing 'pr6372':" - @echo "type _ t = C: { f: ('a -> [<\`X]) t } -> [<\`X] t" > d.mli - @echo "open D;; let f (C {f}) = ()" > e.ml - @$(OCAMLC) -c d.mli e.ml \ - && echo " => passed" || echo " => failed" - -pr7563: - @printf " ... testing 'pr7563':" - @echo "module A = struct end" > f.ml - @echo "module Alias = A" >> f.ml - @echo "exception Alias" >> f.ml - @echo "let alias = Alias" >> f.ml - @echo "exit (if F.Alias = F.alias then 0 else 1)" > g.ml - @$(OCAMLC) f.ml g.ml -o test && $(OCAMLRUN) ./test \ - && echo " => passed" || echo " => failed" - -clean: defaultclean - @rm -f $(GENERATED) - -include $(BASEDIR)/makefiles/Makefile.common diff --git a/testsuite/tests/typing-multifile/a.ml b/testsuite/tests/typing-multifile/a.ml new file mode 100644 index 0000000000..03ee0dcd13 --- /dev/null +++ b/testsuite/tests/typing-multifile/a.ml @@ -0,0 +1 @@ +type _ t = T diff --git a/testsuite/tests/typing-multifile/b.ml b/testsuite/tests/typing-multifile/b.ml new file mode 100644 index 0000000000..ea1529f643 --- /dev/null +++ b/testsuite/tests/typing-multifile/b.ml @@ -0,0 +1 @@ +type 'a t = 'a A.t diff --git a/testsuite/tests/typing-multifile/c.ml b/testsuite/tests/typing-multifile/c.ml new file mode 100644 index 0000000000..28e2e982e9 --- /dev/null +++ b/testsuite/tests/typing-multifile/c.ml @@ -0,0 +1 @@ +external f : unit -> unit B.t = "%identity" diff --git a/testsuite/tests/typing-multifile/d.mli b/testsuite/tests/typing-multifile/d.mli new file mode 100644 index 0000000000..3dfbd09154 --- /dev/null +++ b/testsuite/tests/typing-multifile/d.mli @@ -0,0 +1 @@ +type _ t = C: { f: ('a -> [<`X]) t } -> [<`X] t diff --git a/testsuite/tests/typing-multifile/e.ml b/testsuite/tests/typing-multifile/e.ml new file mode 100644 index 0000000000..c9e89ba982 --- /dev/null +++ b/testsuite/tests/typing-multifile/e.ml @@ -0,0 +1 @@ +open D;; let f (C {f}) = () diff --git a/testsuite/tests/typing-multifile/f.ml b/testsuite/tests/typing-multifile/f.ml new file mode 100644 index 0000000000..ac45c7343e --- /dev/null +++ b/testsuite/tests/typing-multifile/f.ml @@ -0,0 +1,4 @@ +module A = struct end +module Alias = A +exception Alias +let alias = Alias diff --git a/testsuite/tests/typing-multifile/ocamltests b/testsuite/tests/typing-multifile/ocamltests new file mode 100644 index 0000000000..af8a34d49e --- /dev/null +++ b/testsuite/tests/typing-multifile/ocamltests @@ -0,0 +1,3 @@ +pr6372.ml +pr7325.ml +pr7563.ml diff --git a/testsuite/tests/typing-multifile/pr6372.ml b/testsuite/tests/typing-multifile/pr6372.ml new file mode 100644 index 0000000000..727839cf93 --- /dev/null +++ b/testsuite/tests/typing-multifile/pr6372.ml @@ -0,0 +1,9 @@ +(* TEST +files = "d.mli e.ml" +* setup-ocamlc.byte-build-env +** ocamlc.byte +module = "d.mli" +*** ocamlc.byte +module = "e.ml" +**** check-ocamlc.byte-output +*) diff --git a/testsuite/tests/typing-multifile/pr7325.ml b/testsuite/tests/typing-multifile/pr7325.ml new file mode 100644 index 0000000000..918549d7cd --- /dev/null +++ b/testsuite/tests/typing-multifile/pr7325.ml @@ -0,0 +1,13 @@ +(* TEST +files = "a.ml b.ml c.ml" +* setup-ocamlc.byte-build-env +** ocamlc.byte +module = "a.ml" +*** ocamlc.byte +module = "b.ml" +**** script +script = "rm a.cmi" +***** ocamlc.byte +module = "c.ml" +****** check-ocamlc.byte-output +*)
\ No newline at end of file diff --git a/testsuite/tests/typing-multifile/pr7563.ml b/testsuite/tests/typing-multifile/pr7563.ml new file mode 100644 index 0000000000..d7950efbea --- /dev/null +++ b/testsuite/tests/typing-multifile/pr7563.ml @@ -0,0 +1,5 @@ +(* TEST +modules = "f.ml" +*) + +exit (if F.Alias = F.alias then 0 else 1) |