Skip to content

Commit e418d93

Browse files
committed
Don't rely on Curry in unit tests.
1 parent 61e3d65 commit e418d93

File tree

4 files changed

+75
-93
lines changed

4 files changed

+75
-93
lines changed

jscomp/test/mt.js

Lines changed: 3 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/mt.res

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function from_suites(name, suite) {
5353
return List.iter((function (param) {
5454
var partial_arg = param[1];
5555
it(param[0], (function () {
56-
return Curry._1(partial_arg, undefined);
56+
return partial_arg(undefined);
5757
}));
5858
}), suite);
5959
}));
@@ -118,11 +118,6 @@ let handleCode = spec =>
118118
| FailWith(msg) => assert_fail(msg)
119119
}
120120

121-
let force_curry = x => {
122-
let _ = List.hd(list{3})
123-
let _ = Array.copy([5])
124-
x()
125-
}
126121
let from_pair_suites = %raw(`
127122
function from_pair_suites(name, suites) {
128123
var match = $$Array.to_list(Process.argv);
@@ -132,7 +127,7 @@ function from_pair_suites(name, suites) {
132127
return List.iter((function (param) {
133128
var code = param[1];
134129
it(param[0], (function () {
135-
return handleCode(Curry._1(code, undefined));
130+
return handleCode(code(undefined));
136131
}));
137132
}), suites);
138133
}));
@@ -144,7 +139,7 @@ function from_pair_suites(name, suites) {
144139
]);
145140
return List.iter((function (param) {
146141
var name = param[0];
147-
var fn = Curry._1(param[1], undefined);
142+
var fn = param[1](undefined);
148143
switch (fn.TAG) {
149144
case "Eq" :
150145
console.log([

jscomp/test/mt.resi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ let eq_suites: (~test_id: ref<int>, ~suites: ref<pair_suites>, string, 'b, 'b) =
2525
let bool_suites: (~test_id: ref<int>, ~suites: ref<pair_suites>, string, bool) => unit
2626

2727
let throw_suites: (~test_id: ref<int>, ~suites: ref<pair_suites>, string, unit => unit) => unit
28-
29-
let force_curry: (unit => unit) => unit

jscomp/test/ocaml_re_test.js

Lines changed: 69 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)