Skip to content

Commit 6e7a5c2

Browse files
committed
Build Core tests
1 parent ed10b03 commit 6e7a5c2

27 files changed

+3216
-3347
lines changed

tests/tests/src/core/Core_ArrayTests.mjs

Lines changed: 396 additions & 410 deletions
Large diffs are not rendered by default.
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
// Generated by ReScript, PLEASE EDIT WITH CARE
22

33
import * as Test from "./Test.mjs";
4-
import * as Caml_obj from "rescript/lib/es6/caml_obj.js";
4+
import * as Primitive_object from "rescript/lib/es6/Primitive_object.js";
55

6-
var eq = Caml_obj.equal;
6+
let eq = Primitive_object.equal;
77

88
Test.run([
9-
[
10-
"DictTests.res",
11-
5,
12-
20,
13-
26
14-
],
15-
"make"
16-
], {}, eq, {});
9+
[
10+
"Core_DictTests.res",
11+
3,
12+
20,
13+
26
14+
],
15+
"make"
16+
], {}, eq, {});
1717

1818
Test.run([
19-
[
20-
"DictTests.res",
21-
7,
22-
20,
23-
31
24-
],
25-
"fromArray"
26-
], Object.fromEntries([[
27-
"foo",
28-
"bar"
29-
]]), eq, {foo: "bar"});
19+
[
20+
"Core_DictTests.res",
21+
5,
22+
20,
23+
31
24+
],
25+
"fromArray"
26+
], Object.fromEntries([[
27+
"foo",
28+
"bar"
29+
]]), eq, {foo: "bar"});
3030

3131
Test.run([
32-
[
33-
"DictTests.res",
34-
10,
35-
13,
36-
35
37-
],
38-
"getUnsafe - existing"
39-
], Object.fromEntries([[
40-
"foo",
41-
"bar"
42-
]])["foo"], eq, "bar");
32+
[
33+
"Core_DictTests.res",
34+
8,
35+
13,
36+
35
37+
],
38+
"getUnsafe - existing"
39+
], Object.fromEntries([[
40+
"foo",
41+
"bar"
42+
]])["foo"], eq, "bar");
4343

4444
Test.run([
45-
[
46-
"DictTests.res",
47-
16,
48-
13,
49-
34
50-
],
51-
"getUnsafe - missing"
52-
], ({})["foo"], eq, undefined);
45+
[
46+
"Core_DictTests.res",
47+
14,
48+
13,
49+
34
50+
],
51+
"getUnsafe - missing"
52+
], ({})["foo"], eq, undefined);
5353

5454
export {
55-
eq ,
55+
eq,
5656
}
5757
/* Not a pure module */
Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
// Generated by ReScript, PLEASE EDIT WITH CARE
22

3+
import * as Exn from "rescript/lib/es6/Exn.js";
34
import * as Test from "./Test.mjs";
4-
import * as Js_exn from "rescript/lib/es6/js_exn.js";
5-
import * as RescriptCore from "../src/RescriptCore.mjs";
6-
import * as Caml_js_exceptions from "rescript/lib/es6/caml_js_exceptions.js";
5+
import * as Pervasives from "rescript/lib/es6/Pervasives.js";
6+
import * as Primitive_exceptions from "rescript/lib/es6/Primitive_exceptions.js";
77

88
function panicTest() {
9-
var caught;
9+
let caught;
1010
try {
11-
caught = RescriptCore.panic("uh oh");
12-
}
13-
catch (raw_err){
14-
var err = Caml_js_exceptions.internalToOCamlException(raw_err);
15-
if (err.RE_EXN_ID === Js_exn.$$Error) {
11+
caught = Pervasives.panic("uh oh");
12+
} catch (raw_err) {
13+
let err = Primitive_exceptions.internalToException(raw_err);
14+
if (err.RE_EXN_ID === Exn.$$Error) {
1615
caught = err._1.message;
1716
} else {
1817
throw err;
1918
}
2019
}
2120
Test.run([
22-
[
23-
"ErrorTests.res",
24-
8,
25-
22,
26-
43
27-
],
28-
"Should resolve test"
29-
], caught, (function (prim0, prim1) {
30-
return prim0 === prim1;
31-
}), "Panic! uh oh");
21+
[
22+
"Core_ErrorTests.res",
23+
6,
24+
22,
25+
43
26+
],
27+
"Should resolve test"
28+
], caught, (prim0, prim1) => prim0 === prim1, "Panic! uh oh");
3229
}
3330

3431
panicTest();
3532

3633
export {
37-
panicTest ,
34+
panicTest,
3835
}
3936
/* Not a pure module */

0 commit comments

Comments
 (0)