Skip to content

Commit 16b6d90

Browse files
committed
Make tests uncurried-ready.
Tweak tests so they build in uncurried mode.
1 parent 80764b1 commit 16b6d90

Some content is hidden

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

78 files changed

+361
-426
lines changed

jscomp/test/UntaggedVariants.js

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

jscomp/test/UntaggedVariants.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ module Arr = {
375375

376376
let classify = async (a: arr) =>
377377
switch a {
378-
| Array(arr) => Js.log(arr->Belt.Array.joinWith("-"))
378+
| Array(arr) => Js.log(arr->Belt.Array.joinWith("-", x => x))
379379
| String(s) => Js.log(s)
380380
| Promise(p) => Js.log(await p)
381381
| Object({userName}) => Js.log(userName)
@@ -408,7 +408,7 @@ module AllInstanceofTypes = {
408408
| Object({userName}) => Js.log(userName)
409409
| Date(date) => Js.log(date->Js.Date.toString)
410410
| RegExp(re) => Js.log(re->Js.Re.test_("test"))
411-
| Array(arr) => Js.log(arr->Belt.Array.joinWith("-"))
411+
| Array(arr) => Js.log(arr->Belt.Array.joinWith("-", x => x))
412412
| File(file) => Js.log(file->fileName)
413413
| Blob(blob) => Js.log(blob->blobSize)
414414
}

jscomp/test/a_filename_test.js

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

jscomp/test/a_filename_test.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let eq = (loc, x, y) => {
99
list{(loc ++ (" id " ++ string_of_int(test_id.contents)), _ => Mt.Eq(x, y)), ...suites.contents}
1010
}
1111

12-
let test = Ext_filename_test.node_relative_path(true)
12+
let test = (x,y) => Ext_filename_test.node_relative_path(true, x, y)
1313
let () = /* TODO: adapt these tests to run on Windows. */
1414
if platform !== #win32 {
1515
eq(

jscomp/test/ari_regress_test.res

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
let f = x => \"+"(x)
2-
let g = f(3, 4)
1+
let f = x => \"+"(x, ...)
2+
let g = f(3)(4)
33

44
let h = ref(0)
55

@@ -13,9 +13,9 @@ let g1 = (x, y) => {
1313
let () = incr(h)
1414
(xx, yy) => xx + yy + u
1515
}
16-
let x = gg(3, 5, 6)
16+
let x = gg(3, 5)(6)
1717

18-
let v = g1(3, 4, 6)
18+
let v = g1(3, 4)(6, ...)
1919

2020
let suites = {
2121
open Mt

jscomp/test/arity_deopt.res

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ let f3 = x => {
4444
So the best is never shrink functons which could change arity
4545
*/
4646
let () = {
47-
\"@@"(eq(__LOC__, 6), f0(. 1, 2, 3))
48-
\"@@"(eq(__LOC__, 6), f1(1)(. 2, 3))
49-
\"@@"(eq(__LOC__, 6), f2(. 1, 2)(3))
50-
\"@@"(eq(__LOC__, 6), f3(1)(. 2, 3))
47+
\"@@"(eq(__LOC__, 6, ...), f0(. 1, 2, 3))
48+
\"@@"(eq(__LOC__, 6, ...), f1(1)(. 2, 3))
49+
\"@@"(eq(__LOC__, 6, ...), f2(. 1, 2)(3))
50+
\"@@"(eq(__LOC__, 6, ...), f3(1)(. 2, 3))
5151
}
5252
let () = Mt.from_pair_suites(__MODULE__, suites.contents)

jscomp/test/async_inline.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/async_inline.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ type callback<'input, 'output> = 'input => 'output
5757
external useCallback: (@uncurry ('input => 'output)) => callback<'input, 'output> = "useCallback"
5858

5959
let onSubmit = () =>
60-
useCallback(async (_a, b) => {
60+
useCallback(async b => {
6161
await b
6262
})

jscomp/test/bigint_test.js

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

jscomp/test/bigint_test.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let (test_id, suites) = (ref(0), ref(list{}))
2-
let eq = loc => Mt_global.collect_eq(test_id, suites, loc)
3-
let approx = loc => Mt_global.collect_approx(test_id, suites, loc)
2+
let eq = (loc, x, y) => Mt_global.collect_eq(test_id, suites, loc, x, y)
3+
let approx = (loc, x, y) => Mt_global.collect_approx(test_id, suites, loc, x, y)
44

55
let bigint_compare = (x: bigint, y) => Pervasives.compare(x, y)
66
let generic_compare = Pervasives.compare

jscomp/test/bs_abstract_test.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ type u = {
2727
y1: (int, int) => int,
2828
}
2929

30-
let uf = u => u->y0Get(1)
31-
let uf1 = u => u->y1Get(1)
32-
let uf2 = u => u->y1Get(1, 2)
30+
let uf = u => y0Get(u)(1)
31+
let uf1 = u => y1Get(u)(1, ...)
32+
let uf2 = u => y1Get(u)(1, 2)
3333

3434
@deriving(abstract)
3535
type u1 = {

jscomp/test/bs_abstract_test.resi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ and x = private {
1414
let f: x
1515
type u
1616
let uf: u => int
17-
let uf1: (u, int) => int
17+
let uf1: u => int => int
1818
let uf2: u => int
1919

2020
type u1

0 commit comments

Comments
 (0)