Skip to content

Commit e2e348e

Browse files
committed
snapshot
1 parent ceb06b1 commit e2e348e

File tree

1 file changed

+56
-45
lines changed

1 file changed

+56
-45
lines changed

lib/4.06.1/unstable/all_ounit_tests.ml

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8126,7 +8126,7 @@ let suites =
81268126
ok (v_output.exit_code = 0) v_output
81278127
end;
81288128
__LOC__ >:: begin fun _ ->
8129-
let v_output = perform_bsc [|"-bs-eval"; {|type 'a arra = 'a array
8129+
let v_output = perform_bsc [|"-bs-eval"; {|type 'a arra = 'a array
81308130
external
81318131
f :
81328132
int -> int -> int arra -> unit
@@ -8135,8 +8135,8 @@ let suites =
81358135
[@@bs.splice]|}|] in
81368136
OUnit.assert_bool __LOC__ (Ext_string.contain_substring v_output.stderr "variadic")
81378137
end;
8138-
__LOC__ >:: begin fun _ ->
8139-
let v_output = perform_bsc [|"-bs-eval"; {|external
8138+
__LOC__ >:: begin fun _ ->
8139+
let v_output = perform_bsc [|"-bs-eval"; {|external
81408140
f2 :
81418141
int -> int -> ?y:int array -> unit
81428142
= ""
@@ -8152,13 +8152,13 @@ let suites =
81528152
OUnit.assert_bool __LOC__ (Ext_string.contain_substring
81538153
should_be_warning.stderr "Unused")
81548154
end;
8155-
__LOC__ >:: begin fun _ ->
8155+
__LOC__ >:: begin fun _ ->
81568156
let should_be_warning =
81578157
bsc_check_eval {| external mk : int -> ([`a|`b [@bs.string]]) = "mk" [@@bs.val] |} in
8158-
OUnit.assert_bool __LOC__
8158+
OUnit.assert_bool __LOC__
81598159
(Ext_string.contain_substring
8160-
should_be_warning.stderr "Unused")
8161-
end;
8160+
should_be_warning.stderr "Unused")
8161+
end;
81628162
__LOC__ >:: begin fun _ ->
81638163
let should_err = bsc_check_eval {|
81648164
external ff :
@@ -8261,12 +8261,12 @@ external ff :
82618261
end;
82628262

82638263
(* __LOC__ >:: begin fun _ ->
8264-
let should_err = bsc_check_eval {|
8265-
external f : string -> unit -> unit = "x.y" [@@bs.send]
8266-
|} in
8267-
OUnit.assert_bool __LOC__
8264+
let should_err = bsc_check_eval {|
8265+
external f : string -> unit -> unit = "x.y" [@@bs.send]
8266+
|} in
8267+
OUnit.assert_bool __LOC__
82688268
(Ext_string.contain_substring should_err.stderr "Not a valid method name")
8269-
end; *)
8269+
end; *)
82708270

82718271

82728272
__LOC__ >:: begin fun _ ->
@@ -8276,7 +8276,7 @@ type t10 = A of t10 [@@ocaml.unboxed];;
82768276
let rec x = A x;;
82778277
|} in
82788278
OUnit.assert_bool __LOC__
8279-
(Ext_string.contain_substring should_err.stderr "This kind of expression is not allowed")
8279+
(Ext_string.contain_substring should_err.stderr "This kind of expression is not allowed")
82808280
end;
82818281

82828282
__LOC__ >:: begin fun _ ->
@@ -8285,15 +8285,15 @@ let rec x = A x;;
82858285
let rec x = {x = y} and y = 3L;;
82868286
|} in
82878287
OUnit.assert_bool __LOC__
8288-
(Ext_string.contain_substring should_err.stderr "This kind of expression is not allowed")
8288+
(Ext_string.contain_substring should_err.stderr "This kind of expression is not allowed")
82898289
end;
82908290
__LOC__ >:: begin fun _ ->
82918291
let should_err = bsc_check_eval {|
82928292
type r = A of r [@@unboxed];;
82938293
let rec y = A y;;
82948294
|} in
82958295
OUnit.assert_bool __LOC__
8296-
(Ext_string.contain_substring should_err.stderr "This kind of expression is not allowed")
8296+
(Ext_string.contain_substring should_err.stderr "This kind of expression is not allowed")
82978297
end;
82988298

82998299
__LOC__ >:: begin fun _ ->
@@ -8336,60 +8336,71 @@ let rec y = A y;;
83368336

83378337
end;
83388338
__LOC__ >:: begin fun _ ->
8339-
let should_err = bsc_check_eval {|
8339+
let should_err = bsc_check_eval {|
83408340
external foo_bar :
83418341
(_ [@bs.as "foo"]) ->
83428342
string ->
83438343
string = "bar"
83448344
[@@bs.send]
83458345
|} in
8346-
OUnit.assert_bool __LOC__
8347-
(Ext_string.contain_substring should_err.stderr "Ill defined attribute")
8348-
end;
8346+
OUnit.assert_bool __LOC__
8347+
(Ext_string.contain_substring should_err.stderr "Ill defined attribute")
8348+
end;
83498349
__LOC__ >:: begin fun _ ->
8350-
let should_err = bsc_check_eval {|
8350+
let should_err = bsc_check_eval {|
83518351
let bla4 foo x y = foo##(method1 x y [@bs])
83528352
|} in
8353-
(* Ounit_cmd_util.debug_output should_err ; *)
8354-
OUnit.assert_bool __LOC__
8355-
(Ext_string.contain_substring should_err.stderr
8356-
"Unused")
8357-
end;
8353+
(* Ounit_cmd_util.debug_output should_err ; *)
8354+
OUnit.assert_bool __LOC__
8355+
(Ext_string.contain_substring should_err.stderr
8356+
"Unused")
8357+
end;
83588358
__LOC__ >:: begin fun _ ->
8359-
let should_err = bsc_check_eval {|
8359+
let should_err = bsc_check_eval {|
83608360
external mk : int ->
83618361
(
83628362
[`a|`b]
83638363
[@bs.string]
83648364
) = "mk" [@@bs.val]
83658365
|} in
8366-
(* Ounit_cmd_util.debug_output should_err ; *)
8367-
OUnit.assert_bool __LOC__
8368-
(Ext_string.contain_substring should_err.stderr
8369-
"Unused")
8370-
end;
8371-
__LOC__ >:: begin fun _ ->
8372-
let should_err = bsc_check_eval {|
8366+
(* Ounit_cmd_util.debug_output should_err ; *)
8367+
OUnit.assert_bool __LOC__
8368+
(Ext_string.contain_substring should_err.stderr
8369+
"Unused")
8370+
end;
8371+
__LOC__ >:: begin fun _ ->
8372+
let should_err = bsc_check_eval {|
83738373
type -'a t = {k : 'a } [@@bs.deriving abstract]
83748374
|} in
8375-
OUnit.assert_bool __LOC__
8376-
(Ext_string.contain_substring should_err.stderr "contravariant")
8377-
end;
8378-
__LOC__ >:: begin fun _ ->
8379-
let should_err = bsc_check_eval {|
8375+
OUnit.assert_bool __LOC__
8376+
(Ext_string.contain_substring should_err.stderr "contravariant")
8377+
end;
8378+
__LOC__ >:: begin fun _ ->
8379+
let should_err = bsc_check_eval {|
83808380
let u = [||]
83818381
|} in
8382-
OUnit.assert_bool __LOC__
8383-
(Ext_string.contain_substring should_err.stderr "cannot be generalized")
8384-
end
8382+
OUnit.assert_bool __LOC__
8383+
(Ext_string.contain_substring should_err.stderr "cannot be generalized")
8384+
end;
8385+
__LOC__ >:: begin fun _ ->
8386+
let should_err = bsc_check_eval {|
8387+
external push : 'a array -> 'a -> unit = "push" [@@send]
8388+
let a = [||]
8389+
let () =
8390+
push a 3 |. ignore ;
8391+
push a "3" |. ignore
8392+
|} in
8393+
OUnit.assert_bool __LOC__
8394+
(Ext_string.contain_substring should_err.stderr "has type string")
8395+
end
83858396
(* __LOC__ >:: begin fun _ -> *)
83868397
(* let should_infer = perform_bsc [| "-i"; "-bs-eval"|] {| *)
8387-
(* let f = fun [@bs] x -> let (a,b) = x in a + b *)
8388-
(* |} in *)
8398+
(* let f = fun [@bs] x -> let (a,b) = x in a + b *)
8399+
(* |} in *)
83898400
(* let infer_type = bsc_eval (Printf.sprintf {| *)
83908401

8391-
(* let f : %s = fun [@bs] x -> let (a,b) = x in a + b *)
8392-
(* |} should_infer.stdout ) in *)
8402+
(* let f : %s = fun [@bs] x -> let (a,b) = x in a + b *)
8403+
(* |} should_infer.stdout ) in *)
83938404
(* begin *)
83948405
(* Ounit_cmd_util.debug_output should_infer ; *)
83958406
(* Ounit_cmd_util.debug_output infer_type ; *)

0 commit comments

Comments
 (0)