Skip to content

Commit a7f3228

Browse files
committed
update tests
1 parent e486fe3 commit a7f3228

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

jscomp/test/build.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ build test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attr
340340
build test/gray_code_test.cmi test/gray_code_test.cmj : cc test/gray_code_test.ml | $stdlib
341341
build test/guide_for_ext.cmi test/guide_for_ext.cmj : cc test/guide_for_ext.ml | $stdlib
342342
build test/hamming_test.cmi test/hamming_test.cmj : cc test/hamming_test.ml | test/mt.cmj $stdlib
343-
build test/hash_collision.cmi test/hash_collision.cmj : cc test/hash_collision.ml | $stdlib
343+
build test/hash_collision.cmi test/hash_collision.cmj : cc test/hash_collision.ml | test/mt.cmj $stdlib
344344
build test/hash_test.cmi test/hash_test.cmj : cc test/hash_test.ml | test/mt.cmj test/mt_global.cmj $stdlib
345345
build test/hashtbl_test.cmi test/hashtbl_test.cmj : cc test/hashtbl_test.ml | test/mt.cmj $stdlib
346346
build test/hello.foo.cmi test/hello.foo.cmj : cc test/hello.foo.ml | $stdlib

jscomp/test/hash_collision.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ function f1(x) {
3030
}
3131
}
3232

33+
var hi = [
34+
"Eric_Cooper",
35+
"azdwbie"
36+
];
37+
3338
eq("File \"hash_collision.ml\", line 24, characters 9-16", 1, 0);
3439

3540
eq("File \"hash_collision.ml\", line 25, characters 9-16", 1, 1);
@@ -51,4 +56,5 @@ exports.test_id = test_id;
5156
exports.eq = eq;
5257
exports.f0 = f0;
5358
exports.f1 = f1;
59+
exports.hi = hi;
5460
/* Not a pure module */

jscomp/test/hash_collision.ml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#if BS then
1+
22
let suites : Mt.pair_suites ref = ref []
33
let test_id = ref 0
44
let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y
5-
#end
5+
66
type collision = [`Eric_Cooper | `azdwbie];;
77

88
let f0 x =
@@ -20,7 +20,7 @@ let f1 x =
2020

2121

2222

23-
#if BS then
23+
let hi : collision array = [| `Eric_Cooper; `azdwbie |]
2424
;; eq __LOC__ (f0 `Eric_Cooper) 0
2525
;; eq __LOC__ (f0 `azdwbie) 1
2626

@@ -29,4 +29,3 @@ let f1 x =
2929
;; eq __LOC__ (f1 (`azdwbie (-2))) 0
3030

3131
;; Mt.from_pair_suites __FILE__ !suites
32-
#end

0 commit comments

Comments
 (0)