diff options
Diffstat (limited to 'testsuite/tests/typing-recmod')
24 files changed, 201 insertions, 110 deletions
diff --git a/testsuite/tests/typing-recmod/gpr1626.ml b/testsuite/tests/typing-recmod/gpr1626.ml index 9629f2c603..69429ec142 100644 --- a/testsuite/tests/typing-recmod/gpr1626.ml +++ b/testsuite/tests/typing-recmod/gpr1626.ml @@ -1,5 +1,5 @@ (* TEST - * expect + expect; *) module type S = sig module M : sig end module N = M end;; diff --git a/testsuite/tests/typing-recmod/pr6491.ml b/testsuite/tests/typing-recmod/pr6491.ml index 410c11b364..8d6e673902 100644 --- a/testsuite/tests/typing-recmod/pr6491.ml +++ b/testsuite/tests/typing-recmod/pr6491.ml @@ -1,5 +1,5 @@ (* TEST - * expect + expect; *) module rec Foo : sig class type c = object method x : int end end = Foo diff --git a/testsuite/tests/typing-recmod/pr9494.ml b/testsuite/tests/typing-recmod/pr9494.ml index 41fda6aa15..2b5c17d025 100644 --- a/testsuite/tests/typing-recmod/pr9494.ml +++ b/testsuite/tests/typing-recmod/pr9494.ml @@ -1,5 +1,5 @@ -(* TEST -*) +(* TEST_BELOW +(* Blank lines added here to preserve locations. *)*) (* PR#9494 *) @@ -36,3 +36,6 @@ let _ = try let basic_set = IdSet.singleton {id = 0} in IdSet.mem {id = 1} basic_set (* diverge here *) with e -> print_endline @@ Printexc.to_string e; false + +(* TEST +*) diff --git a/testsuite/tests/typing-recmod/t01bad.ml b/testsuite/tests/typing-recmod/t01bad.ml index 5bf6197f37..faedd9f2e8 100644 --- a/testsuite/tests/typing-recmod/t01bad.ml +++ b/testsuite/tests/typing-recmod/t01bad.ml @@ -1,10 +1,18 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (t = t) *) module rec A : sig type t = A.t end = struct type t = A.t end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t02bad.ml b/testsuite/tests/typing-recmod/t02bad.ml index 1faba72b87..9a52879bcd 100644 --- a/testsuite/tests/typing-recmod/t02bad.ml +++ b/testsuite/tests/typing-recmod/t02bad.ml @@ -1,11 +1,19 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (t = t) *) module rec A : sig type t = B.t end = struct type t = B.t end and B : sig type t = A.t end = struct type t = A.t end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t03ok.ml b/testsuite/tests/typing-recmod/t03ok.ml index a1c9b32a95..94e4a09f32 100644 --- a/testsuite/tests/typing-recmod/t03ok.ml +++ b/testsuite/tests/typing-recmod/t03ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* OK (t = int) *) diff --git a/testsuite/tests/typing-recmod/t04bad.ml b/testsuite/tests/typing-recmod/t04bad.ml index a671b414d4..6f39c910e1 100644 --- a/testsuite/tests/typing-recmod/t04bad.ml +++ b/testsuite/tests/typing-recmod/t04bad.ml @@ -1,10 +1,18 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (t = int * t) *) module rec A : sig type t = int * A.t end = struct type t = int * A.t end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t05bad.ml b/testsuite/tests/typing-recmod/t05bad.ml index 1f1df6c590..94d4fc2587 100644 --- a/testsuite/tests/typing-recmod/t05bad.ml +++ b/testsuite/tests/typing-recmod/t05bad.ml @@ -1,11 +1,19 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (t = t -> int) *) module rec A : sig type t = B.t -> int end = struct type t = B.t -> int end and B : sig type t = A.t end = struct type t = A.t end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t06ok.ml b/testsuite/tests/typing-recmod/t06ok.ml index a0cfebdbc2..c39b0fa99a 100644 --- a/testsuite/tests/typing-recmod/t06ok.ml +++ b/testsuite/tests/typing-recmod/t06ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* OK (t = <m:t>) *) diff --git a/testsuite/tests/typing-recmod/t07bad.ml b/testsuite/tests/typing-recmod/t07bad.ml index 27e8f1859f..61f8972253 100644 --- a/testsuite/tests/typing-recmod/t07bad.ml +++ b/testsuite/tests/typing-recmod/t07bad.ml @@ -1,11 +1,19 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (not regular) *) module rec A : sig type 'a t = <m: 'a list A.t> end = struct type 'a t = <m: 'a list A.t> end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t08bad.ml b/testsuite/tests/typing-recmod/t08bad.ml index 46d2b727c4..341459a6d1 100644 --- a/testsuite/tests/typing-recmod/t08bad.ml +++ b/testsuite/tests/typing-recmod/t08bad.ml @@ -1,12 +1,20 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (not regular) *) module rec A : sig type 'a t = <m: 'a list B.t; n: 'a array B.t> end = struct type 'a t = <m: 'a list B.t; n: 'a array B.t> end and B : sig type 'a t = 'a A.t end = struct type 'a t = 'a A.t end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t09bad.ml b/testsuite/tests/typing-recmod/t09bad.ml index 9ac5d3133d..21fa28620d 100644 --- a/testsuite/tests/typing-recmod/t09bad.ml +++ b/testsuite/tests/typing-recmod/t09bad.ml @@ -1,9 +1,9 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (not regular) *) @@ -11,3 +11,11 @@ module rec A : sig type 'a t = 'a B.t end = struct type 'a t = 'a B.t end and B : sig type 'a t = <m: 'a list A.t; n: 'a array A.t> end = struct type 'a t = <m: 'a list A.t; n: 'a array A.t> end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t10ok.ml b/testsuite/tests/typing-recmod/t10ok.ml index 626ab888fc..8f8b376f34 100644 --- a/testsuite/tests/typing-recmod/t10ok.ml +++ b/testsuite/tests/typing-recmod/t10ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* OK *) diff --git a/testsuite/tests/typing-recmod/t11bad.ml b/testsuite/tests/typing-recmod/t11bad.ml index f6f2fed846..58f186ebdb 100644 --- a/testsuite/tests/typing-recmod/t11bad.ml +++ b/testsuite/tests/typing-recmod/t11bad.ml @@ -1,9 +1,9 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (not regular) *) @@ -11,3 +11,11 @@ module rec A : sig type 'a t = 'a list B.t end = struct type 'a t = 'a list B.t end and B : sig type 'a t = <m: 'a array B.t> end = struct type 'a t = <m: 'a array B.t> end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t12bad.ml b/testsuite/tests/typing-recmod/t12bad.ml index cbc8c5bbaf..f7a5ec730c 100644 --- a/testsuite/tests/typing-recmod/t12bad.ml +++ b/testsuite/tests/typing-recmod/t12bad.ml @@ -1,9 +1,9 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad (not regular) *) @@ -19,3 +19,11 @@ module rec M : = fun f -> new M.c (f x) end end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t13ok.ml b/testsuite/tests/typing-recmod/t13ok.ml index ee50f89041..0b0eb85073 100644 --- a/testsuite/tests/typing-recmod/t13ok.ml +++ b/testsuite/tests/typing-recmod/t13ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* OK *) diff --git a/testsuite/tests/typing-recmod/t14bad.ml b/testsuite/tests/typing-recmod/t14bad.ml index 4fe91cccc1..ec5f926b34 100644 --- a/testsuite/tests/typing-recmod/t14bad.ml +++ b/testsuite/tests/typing-recmod/t14bad.ml @@ -1,9 +1,9 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad - PR 4261 *) @@ -23,3 +23,11 @@ module PR_4261 = struct module rec U : T with type D.t = U'.t = U and U' : S with type t = U'.t = U end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t15bad.ml b/testsuite/tests/typing-recmod/t15bad.ml index efb99e681e..25840b192a 100644 --- a/testsuite/tests/typing-recmod/t15bad.ml +++ b/testsuite/tests/typing-recmod/t15bad.ml @@ -1,11 +1,19 @@ -(* TEST -flags = " -w -a " -ocamlc_byte_exit_status = "2" -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + *) (* Bad - PR 4512 *) module type S' = sig type t = int end module rec M : S' with type t = M.t = struct type t = M.t end;; + +(* TEST + flags = " -w -a "; + ocamlc_byte_exit_status = "2"; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/typing-recmod/t16ok.ml b/testsuite/tests/typing-recmod/t16ok.ml index 1e87f4f82d..96090e147b 100644 --- a/testsuite/tests/typing-recmod/t16ok.ml +++ b/testsuite/tests/typing-recmod/t16ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* PR#4450 *) diff --git a/testsuite/tests/typing-recmod/t17ok.ml b/testsuite/tests/typing-recmod/t17ok.ml index 2a760d1013..3518ed71f7 100644 --- a/testsuite/tests/typing-recmod/t17ok.ml +++ b/testsuite/tests/typing-recmod/t17ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* A synthetic example of bootstrapped data structure diff --git a/testsuite/tests/typing-recmod/t18ok.ml b/testsuite/tests/typing-recmod/t18ok.ml index e4e3ffa611..f5309952ac 100644 --- a/testsuite/tests/typing-recmod/t18ok.ml +++ b/testsuite/tests/typing-recmod/t18ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* PR 4470: simplified from OMake's sources *) diff --git a/testsuite/tests/typing-recmod/t20ok.ml b/testsuite/tests/typing-recmod/t20ok.ml index ae0eed3264..5fe410f711 100644 --- a/testsuite/tests/typing-recmod/t20ok.ml +++ b/testsuite/tests/typing-recmod/t20ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* PR 4557 *) diff --git a/testsuite/tests/typing-recmod/t21ok.ml b/testsuite/tests/typing-recmod/t21ok.ml index 2c97da3fb9..9eb46a1209 100644 --- a/testsuite/tests/typing-recmod/t21ok.ml +++ b/testsuite/tests/typing-recmod/t21ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) module F ( X : Set.OrderedType ) = struct diff --git a/testsuite/tests/typing-recmod/t22ok.ml b/testsuite/tests/typing-recmod/t22ok.ml index 4709f23c9a..2b5b4d051d 100644 --- a/testsuite/tests/typing-recmod/t22ok.ml +++ b/testsuite/tests/typing-recmod/t22ok.ml @@ -1,8 +1,8 @@ (* TEST -flags = " -w -a " -* setup-ocamlc.byte-build-env -** ocamlc.byte -*** check-ocamlc.byte-output + flags = " -w -a "; + setup-ocamlc.byte-build-env; + ocamlc.byte; + check-ocamlc.byte-output; *) (* Tests for recursive modules *) |