Skip to content

Commit 24563e0

Browse files
committed
Sprint cleaning: convert tests to .res
1 parent b6753da commit 24563e0

File tree

1,499 files changed

+47781
-76425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,499 files changed

+47781
-76425
lines changed

jscomp/test/406_primitive_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ function eq(loc, x, y) {
1616
Mt.eq_suites(test_id, suites, loc, x, y);
1717
}
1818

19-
eq("File \"406_primitive_test.ml\", line 18, characters 6-13", 32, 32);
19+
eq("File \"406_primitive_test.res\", line 13, characters 3-10", 32, 32);
2020

2121
var backend_type = {
2222
TAG: "Other",
2323
_0: "BS"
2424
};
2525

26-
eq("File \"406_primitive_test.ml\", line 29, characters 6-13", backend_type, {
26+
eq("File \"406_primitive_test.res\", line 23, characters 3-10", backend_type, {
2727
TAG: "Other",
2828
_0: "BS"
2929
});

jscomp/test/406_primitive_test.ml

-42
This file was deleted.

jscomp/test/406_primitive_test.res

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
let suites: ref<Mt.pair_suites> = ref(list{})
2+
3+
let test_id = ref(0)
4+
5+
let eq = (loc, x, y): unit => Mt.eq_suites(~test_id, loc, ~suites, x, y)
6+
7+
external int_size: unit => int = "%int_size"
8+
9+
external max_wosize: unit => int = "%max_wosize"
10+
11+
let v = int_size() /* 32 on JS */
12+
13+
eq(__LOC__, v, 32)
14+
type backend_type =
15+
| Native
16+
| Bytecode
17+
| Other(string)
18+
19+
external get_backend_type: unit => backend_type = "%backend_type"
20+
let backend_type = get_backend_type()
21+
22+
let max_array_length = max_wosize()
23+
eq(__LOC__, backend_type, Other("BS"))
24+
25+
let f = () => {
26+
exception A(int)
27+
try for i in 0 to 200 {
28+
if i == 10 {
29+
raise(A(0))
30+
}
31+
} catch {
32+
| A(_) => ()
33+
}
34+
}
35+
36+
Mt.from_pair_suites(__MODULE__, suites.contents)

jscomp/test/a.ml

-31
This file was deleted.

jscomp/test/a.res

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
include (
2+
{
3+
module M = (
4+
S: {
5+
let add: (int, int) => int
6+
},
7+
) => {
8+
let u = S.add(1, 2)
9+
}
10+
module H = M({
11+
let add = (x, y) => x + y
12+
})
13+
14+
include List
15+
module N = List
16+
let v = N.length
17+
18+
module Make = (U: Set.OrderedType) => {
19+
include U
20+
let v = compare
21+
}
22+
23+
module X = Make(String)
24+
module U = Make(Test_order)
25+
26+
include N
27+
/* let v = "xhg" */
28+
/* let () = v.[0] <- 'a' */
29+
}: {}
30+
)
31+
32+
/* [%%bs.cast.x: 'a -> 'b ] */
33+
/* external f : int -> (int -> int) = "%identity" */

jscomp/test/a_filename_test.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function test(param, param$1) {
3434
}
3535

3636
if (process.platform !== "win32") {
37-
eq("File \"a_filename_test.ml\", line 15, characters 5-12", [
37+
eq("File \"a_filename_test.res\", line 16, characters 4-11", [
3838
Ext_filename_test.combine("/tmp", "subdir/file.txt"),
3939
Ext_filename_test.combine("/tmp", "/a/tmp.txt"),
4040
Ext_filename_test.combine("/a/tmp.txt", "subdir/file.txt")
@@ -43,59 +43,59 @@ if (process.platform !== "win32") {
4343
"/a/tmp.txt",
4444
"/a/tmp.txt/subdir/file.txt"
4545
]);
46-
eq("File \"a_filename_test.ml\", line 27, characters 5-12", Ext_filename_test.node_relative_path(true, {
46+
eq("File \"a_filename_test.res\", line 28, characters 5-12", Ext_filename_test.node_relative_path(true, {
4747
NAME: "File",
4848
VAL: "./a/b.c"
4949
}, {
5050
NAME: "File",
5151
VAL: "./a/u/g.c"
5252
}), "./u/g.c");
53-
eq("File \"a_filename_test.ml\", line 32, characters 5-12", Ext_filename_test.node_relative_path(true, {
53+
eq("File \"a_filename_test.res\", line 31, characters 4-11", Ext_filename_test.node_relative_path(true, {
5454
NAME: "File",
5555
VAL: "./a/b.c"
5656
}, {
5757
NAME: "File",
5858
VAL: "xxxghsoghos/ghsoghso/node_modules/buckle-stdlib/list.js"
5959
}), "buckle-stdlib/list.js");
60-
eq("File \"a_filename_test.ml\", line 38, characters 5-12", Ext_filename_test.node_relative_path(true, {
60+
eq("File \"a_filename_test.res\", line 37, characters 4-11", Ext_filename_test.node_relative_path(true, {
6161
NAME: "File",
6262
VAL: "./a/b.c"
6363
}, {
6464
NAME: "File",
6565
VAL: "xxxghsoghos/ghsoghso/node_modules//buckle-stdlib/list.js"
6666
}), "buckle-stdlib/list.js");
67-
eq("File \"a_filename_test.ml\", line 44, characters 5-12", Ext_filename_test.node_relative_path(true, {
67+
eq("File \"a_filename_test.res\", line 43, characters 4-11", Ext_filename_test.node_relative_path(true, {
6868
NAME: "File",
6969
VAL: "./a/b.c"
7070
}, {
7171
NAME: "File",
7272
VAL: "xxxghsoghos/ghsoghso/node_modules/./buckle-stdlib/list.js"
7373
}), "buckle-stdlib/list.js");
74-
eq("File \"a_filename_test.ml\", line 50, characters 5-12", Ext_filename_test.node_relative_path(true, {
74+
eq("File \"a_filename_test.res\", line 48, characters 5-12", Ext_filename_test.node_relative_path(true, {
7575
NAME: "File",
7676
VAL: "./a/c.js"
7777
}, {
7878
NAME: "File",
7979
VAL: "./a/b"
8080
}), "./b");
81-
eq("File \"a_filename_test.ml\", line 55, characters 5-12", Ext_filename_test.node_relative_path(true, {
81+
eq("File \"a_filename_test.res\", line 49, characters 5-12", Ext_filename_test.node_relative_path(true, {
8282
NAME: "File",
8383
VAL: "./a/c"
8484
}, {
8585
NAME: "File",
8686
VAL: "./a/b.js"
8787
}), "./b.js");
88-
eq("File \"a_filename_test.ml\", line 60, characters 5-12", Ext_filename_test.node_relative_path(true, {
88+
eq("File \"a_filename_test.res\", line 50, characters 5-12", Ext_filename_test.node_relative_path(true, {
8989
NAME: "Dir",
9090
VAL: "./a/"
9191
}, {
9292
NAME: "File",
9393
VAL: "./a/b.js"
9494
}), "./b.js");
95-
eq("File \"a_filename_test.ml\", line 65, characters 5-12", Ext_filename_test.get_extension("a.txt"), ".txt");
96-
eq("File \"a_filename_test.ml\", line 69, characters 5-12", Ext_filename_test.get_extension("a"), "");
97-
eq("File \"a_filename_test.ml\", line 73, characters 5-12", Ext_filename_test.get_extension(".txt"), ".txt");
98-
eq("File \"a_filename_test.ml\", line 78, characters 5-12", $$Array.map(Ext_filename_test.normalize_absolute_path, [
95+
eq("File \"a_filename_test.res\", line 51, characters 5-12", Ext_filename_test.get_extension("a.txt"), ".txt");
96+
eq("File \"a_filename_test.res\", line 52, characters 5-12", Ext_filename_test.get_extension("a"), "");
97+
eq("File \"a_filename_test.res\", line 53, characters 5-12", Ext_filename_test.get_extension(".txt"), ".txt");
98+
eq("File \"a_filename_test.res\", line 56, characters 4-11", $$Array.map(Ext_filename_test.normalize_absolute_path, [
9999
"/gsho/./..",
100100
"/a/b/../c../d/e/f",
101101
"/a/b/../c/../d/e/f",

jscomp/test/a_filename_test.ml

-109
This file was deleted.

0 commit comments

Comments
 (0)