File tree 3 files changed +5
-3
lines changed 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ module Flag = struct
80
80
81
81
let safe_string = o ~name: " safestring" ~default: true
82
82
83
- let use_js_string = o ~name: " use-js-string" ~default: false
83
+ let use_js_string = o ~name: " use-js-string" ~default: true
84
84
85
85
let check_magic = o ~name: " check-magic-number" ~default: true
86
86
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ let%expect_test "dup" =
49
49
let s = " Hello" in
50
50
let s' : string = Obj. obj (Obj. dup (Obj. repr s)) in
51
51
print_bool (s = s');
52
- print_bool (s != s');
52
+ (match Sys. backend_type with
53
+ | Other "js_of_ocaml" -> print_bool (s = s')
54
+ | Native | Bytecode | Other _ -> print_bool (s != s'));
53
55
[% expect {|
54
56
true
55
57
true | }];
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ let%expect_test "number comparison" =
67
67
let % expect_test " string comparison" =
68
68
assert (Pack (Js.Unsafe. js_expr " String(2)" ) = Pack (Js. string " 2" ));
69
69
assert (Pack (Js.Unsafe. js_expr " String('abc')" ) = Pack (Js. string " abc" ));
70
- assert (Pack (Js.Unsafe. js_expr " new String('abc')" ) = Pack (Js. string " abc" ));
70
+ assert (Pack (Js.Unsafe. js_expr " new String('abc')" ) <> Pack (Js. string " abc" ));
71
71
assert (Pack (Js.Unsafe. js_expr " String(1)" ) <> Pack (Js. string " 2" ));
72
72
assert (Pack (Js.Unsafe. js_expr " String('abcd')" ) <> Pack (Js. string " abc" ));
73
73
assert (Pack (Js.Unsafe. js_expr " new String('abcd')" ) <> Pack (Js. string " abc" ));
You can’t perform that action at this time.
0 commit comments