Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"module": "es6",
"in-source": true
},
"gentypeconfig": {},
"warnings": {
"error": "+101"
}
Expand Down
9 changes: 9 additions & 0 deletions test/ArrayTests.gen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* TypeScript file generated from ArrayTests.res by genType. */
/* eslint-disable import/first */


// @ts-ignore: Implicit any on import
import * as ArrayTestsBS__Es6Import from './ArrayTests.mjs';
const ArrayTestsBS: any = ArrayTestsBS__Es6Import;

export const a: number[] = ArrayTestsBS.a;
51 changes: 27 additions & 24 deletions test/ArrayTests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ import * as Core__Array from "../src/Core__Array.mjs";

var eq = Caml_obj.equal;

var a = Core__Array.make(6, 7);

Test.run([
[
"ArrayTests.res",
5,
8,
20,
26
],
"make"
], Core__Array.make(6, 7), eq, [
], a, eq, [
7,
7,
7,
Expand All @@ -27,7 +29,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
8,
11,
13,
30
],
Expand All @@ -47,7 +49,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
14,
17,
20,
28
],
Expand All @@ -70,7 +72,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
15,
18,
20,
36
],
Expand All @@ -80,7 +82,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
18,
21,
13,
30
],
Expand Down Expand Up @@ -108,7 +110,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
24,
27,
13,
38
],
Expand All @@ -123,7 +125,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
31,
34,
13,
26
],
Expand All @@ -146,7 +148,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
36,
39,
20,
41
],
Expand All @@ -156,7 +158,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
39,
42,
13,
35
],
Expand Down Expand Up @@ -184,7 +186,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
45,
48,
13,
38
],
Expand All @@ -199,7 +201,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
51,
54,
20,
38
],
Expand All @@ -219,7 +221,7 @@ var arr = [
Test.run([
[
"ArrayTests.res",
54,
57,
13,
38
],
Expand All @@ -229,7 +231,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
65,
68,
13,
24
],
Expand All @@ -255,7 +257,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
70,
73,
20,
42
],
Expand All @@ -274,7 +276,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
72,
75,
13,
32
],
Expand All @@ -289,7 +291,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
78,
81,
20,
30
],
Expand All @@ -306,7 +308,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
80,
83,
13,
34
],
Expand All @@ -324,7 +326,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
85,
88,
20,
41
],
Expand All @@ -338,7 +340,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
86,
89,
20,
38
],
Expand All @@ -348,7 +350,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
89,
92,
13,
22
],
Expand All @@ -370,7 +372,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
94,
97,
20,
40
],
Expand All @@ -389,7 +391,7 @@ Test.run([
Test.run([
[
"ArrayTests.res",
96,
99,
13,
30
],
Expand All @@ -403,5 +405,6 @@ Test.run([

export {
eq ,
a ,
}
/* Not a pure module */
/* a Not a pure module */
5 changes: 4 additions & 1 deletion test/ArrayTests.res
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ open RescriptCore

let eq = (a, b) => a == b

Test.run(__POS_OF__("make"), Array.make(~length=6, 7), eq, [7, 7, 7, 7, 7, 7])
@genType
let a = Array.make(~length=6, 7)

Test.run(__POS_OF__("make"), a, eq, [7, 7, 7, 7, 7, 7])

Test.run(
__POS_OF__("fromInitializer"),
Expand Down
3 changes: 3 additions & 0 deletions test/TestSuite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ var Concurrently = PromiseTest.Concurrently;

var panicTest = ErrorTests.panicTest;

var a = ArrayTests.a;

var $$catch = IntTests.$$catch;

var eq = ResultTests.eq;
Expand All @@ -46,6 +48,7 @@ export {
Catching ,
Concurrently ,
panicTest ,
a ,
$$catch ,
eq ,
forEachIfOkCallFunction ,
Expand Down