diff --git a/tests/syntax_tests/data/idempotency/mareo/Director.res b/tests/syntax_tests/data/idempotency/mareo/Director.res index b0c5e6820b..0b5939b152 100644 --- a/tests/syntax_tests/data/idempotency/mareo/Director.res +++ b/tests/syntax_tests/data/idempotency/mareo/Director.res @@ -498,8 +498,7 @@ let update_loop = (canvas, (player, objs), map_dim) => { List.forEach(parts, part => run_update_particle(state, part)) Draw.fps(canvas, fps) Draw.hud(canvas, state.score, state.coins) - \"@@"( - ignore, + ignore( Dom_html.requestAnimationFrame((t: float) => update_helper(t, state, player, collid_objs.contents, particles.contents) ), diff --git a/tests/syntax_tests/data/idempotency/mareo/Draw.res b/tests/syntax_tests/data/idempotency/mareo/Draw.res index ac1567d1de..f69bea9f1e 100644 --- a/tests/syntax_tests/data/idempotency/mareo/Draw.res +++ b/tests/syntax_tests/data/idempotency/mareo/Draw.res @@ -20,7 +20,7 @@ let render = (sprite, (posx, posy)) => { let sx = sx +. float_of_int(sprite.frame.contents) *. sw /* print_endline (string_of_int !(sprite.frame)); */ /* context##clearRect(0.,0.,sw, sh); */ - \"@@"(ignore, context["drawImage"](sprite.img, sx, sy, sw, sh, dx, dy, dw, dh)) + ignore(context["drawImage"](sprite.img, sx, sy, sw, sh, dx, dy, dw, dh)) } /* Draws two background images, which needs to be done because of the @@ -37,7 +37,7 @@ let clear_canvas = canvas => { let context = Dom_html.canvasRenderingContext2DToJsObj(canvas["getContext"]("2d")) let cwidth = float_of_int(canvas["width"]) let cheight = float_of_int(canvas["height"]) - \"@@"(ignore, context["clearRect"](0., 0., cwidth, cheight)) + ignore(context["clearRect"](0., 0., cwidth, cheight)) } /* Displays the text for score and coins. */ @@ -46,12 +46,11 @@ let hud = (canvas, score, coins) => { let coin_string = string_of_int(coins) let canvas = Dom_html.canvasElementToJsObj(canvas) let context = Dom_html.canvasRenderingContext2DToJsObj(canvas["getContext"]("2d")) - \"@@"(ignore, context["font"] = "10px 'Press Start 2P'") - \"@@"( - ignore, + ignore(context["font"] = "10px 'Press Start 2P'") + ignore( context["fillText"]("Score: " ++ score_string, float_of_int(canvas["width"]) -. 140., 18.), ) - \"@@"(ignore, context["fillText"]("Coins: " ++ coin_string, 120., 18.)) + ignore(context["fillText"]("Coins: " ++ coin_string, 120., 18.)) } /* Displays the fps. */ @@ -59,29 +58,29 @@ let fps = (canvas, fps_val) => { let fps_str = int_of_float(fps_val) |> string_of_int let canvas = Dom_html.canvasElementToJsObj(canvas) let context = Dom_html.canvasRenderingContext2DToJsObj(canvas["getContext"]("2d")) - \"@@"(ignore, context["fillText"](fps_str, 10., 18.)) + ignore(context["fillText"](fps_str, 10., 18.)) } /* game_win displays a black screen when you finish a game. */ let game_win = ctx => { let ctx = Dom_html.canvasRenderingContext2DToJsObj(ctx) - \"@@"(ignore, ctx["rect"](0., 0., 512., 512.)) - \"@@"(ignore, ctx["fillStyle"] = "black") - \"@@"(ignore, ctx["fill"]()) - \"@@"(ignore, ctx["fillStyle"] = "white") - \"@@"(ignore, ctx["font"] = "20px 'Press Start 2P'") - \"@@"(ignore, ctx["fillText"]("You win!", 180., 128.)) + ignore(ctx["rect"](0., 0., 512., 512.)) + ignore(ctx["fillStyle"] = "black") + ignore(ctx["fill"]()) + ignore(ctx["fillStyle"] = "white") + ignore(ctx["font"] = "20px 'Press Start 2P'") + ignore(ctx["fillText"]("You win!", 180., 128.)) failwith("Game over.") } /* gave_loss displays a black screen stating a loss to finish that level play. */ let game_loss = ctx => { let ctx = Dom_html.canvasRenderingContext2DToJsObj(ctx) - \"@@"(ignore, ctx["rect"](0., 0., 512., 512.)) + ignore(ctx["rect"](0., 0., 512., 512.)) ctx["fillStyle"] = "black" - \"@@"(ignore, ctx["fill"]()) + ignore(ctx["fill"]()) ctx["fillStyle"] = "white" ctx["font"] = "20px 'Press Start 2P'" - \"@@"(ignore, ctx["fillText"]("GAME OVER. You lose!", 60., 128.)) + ignore(ctx["fillText"]("GAME OVER. You lose!", 60., 128.)) failwith("Game over.") } diff --git a/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing.res b/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing.res index 7801ce09b6..5640c80f5a 100644 --- a/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing.res +++ b/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing.res @@ -207,10 +207,10 @@ let run = ( ) () => { let (x, y) = (0, 0) - let (x1, y1) = (\"@@"(float_of_int, x + width), \"@@"(float_of_int, y)) - let (x2, y2) = (float_of_int(x), \"@@"(float_of_int, y)) - let (x3, y3) = (\"@@"(float_of_int, x + width), \"@@"(float_of_int, y + height)) - let (x4, y4) = (float_of_int(x), \"@@"(float_of_int, y + height)) + let (x1, y1) = (float_of_int(x + width), float_of_int(y)) + let (x2, y2) = (float_of_int(x), float_of_int(y)) + let (x3, y3) = (float_of_int(x + width), float_of_int(y + height)) + let (x4, y4) = (float_of_int(x), float_of_int(y + height)) let verticesColorAndTexture = [ x1, y1, @@ -277,7 +277,7 @@ let run = ( Reasongl.Gl.Window.setWindowSize(~window=env.window, ~width, ~height) } if fns.filename != "" { - \"@@"(ignore, Reprocessing_Hotreload.checkRebuild(false, fns.filename)) + ignore(Reprocessing_Hotreload.checkRebuild(false, fns.filename)) } if fns.justHotReloaded { let newInitialState = fns.setup(env) diff --git a/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing_Internal.res b/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing_Internal.res index 663bdbcff0..97e2cee753 100644 --- a/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing_Internal.res +++ b/tests/syntax_tests/data/idempotency/reprocessing/Reprocessing_Internal.res @@ -32,18 +32,17 @@ let getProgram = ( if linkedCorrectly { Some(program) } else { - \"@@"(print_endline, "Linking error: " ++ Gl.getProgramInfoLog(~context, program)) + print_endline("Linking error: " ++ Gl.getProgramInfoLog(~context, program)) None } } else { - \"@@"( - print_endline, + print_endline( "Fragment shader error: " ++ Gl.getShaderInfoLog(~context, fragmentShader), ) None } } else { - \"@@"(print_endline, "Vertex shader error: " ++ Gl.getShaderInfoLog(~context, vertexShader)) + print_endline("Vertex shader error: " ++ Gl.getShaderInfoLog(~context, vertexShader)) None } } diff --git a/tests/tests/src/arity_deopt.mjs b/tests/tests/src/arity_deopt.mjs index e12d7b1ffe..0ace475fa5 100644 --- a/tests/tests/src/arity_deopt.mjs +++ b/tests/tests/src/arity_deopt.mjs @@ -41,13 +41,13 @@ function f3(x) { return (y, z) => (x + y | 0) + z | 0; } -eq("File \"arity_deopt.res\", line 50, characters 11-18", 6, 6); +eq("File \"arity_deopt.res\", line 50, characters 6-13", 6, 6); -eq("File \"arity_deopt.res\", line 51, characters 11-18", 6, 6); +eq("File \"arity_deopt.res\", line 51, characters 6-13", 6, 6); -eq("File \"arity_deopt.res\", line 52, characters 11-18", 6, 6); +eq("File \"arity_deopt.res\", line 52, characters 6-13", 6, 6); -eq("File \"arity_deopt.res\", line 53, characters 11-18", 6, 6); +eq("File \"arity_deopt.res\", line 53, characters 6-13", 6, 6); Mt.from_pair_suites("Arity_deopt", suites.contents); diff --git a/tests/tests/src/arity_deopt.res b/tests/tests/src/arity_deopt.res index 954ecef6c1..d8376b2a5a 100644 --- a/tests/tests/src/arity_deopt.res +++ b/tests/tests/src/arity_deopt.res @@ -47,9 +47,9 @@ let f3 = x => { So the best is never shrink functons which could change arity */ let () = { - \"@@"(eq(__LOC__, 6, ...), f0(1, 2, 3)) - \"@@"(eq(__LOC__, 6, ...), f1(1)(2, 3)) - \"@@"(eq(__LOC__, 6, ...), f2(1, 2)(3)) - \"@@"(eq(__LOC__, 6, ...), f3(1)(2, 3)) + (eq(__LOC__, 6, ...))(f0(1, 2, 3)) + (eq(__LOC__, 6, ...))(f1(1)(2, 3)) + (eq(__LOC__, 6, ...))(f2(1, 2)(3)) + (eq(__LOC__, 6, ...))(f3(1)(2, 3)) } let () = Mt.from_pair_suites(__MODULE__, suites.contents) diff --git a/tests/tests/src/array_subtle_test.res b/tests/tests/src/array_subtle_test.res index eccff87e3f..1f9bb0686b 100644 --- a/tests/tests/src/array_subtle_test.res +++ b/tests/tests/src/array_subtle_test.res @@ -29,7 +29,7 @@ let () = { let () = { while Js.Array2.length(v) > 0 { - \"@@"(ignore, Js.Array2.pop(v)) + ignore(Js.Array2.pop(v)) } eq(__LOC__, (0, Js.Array2.length(v))) } @@ -39,7 +39,7 @@ let f = v => { | Some(x) => Js.log("hi") | None => Js.log("hi2") } - Js.log(\"@@"(ignore, Js.Array2.pop(v))) + Js.log(ignore(Js.Array2.pop(v))) } let fff = x => Array.length(x) >= 0 diff --git a/tests/tests/src/bs_array_test.res b/tests/tests/src/bs_array_test.res index b598a344d8..51ac45cd9d 100644 --- a/tests/tests/src/bs_array_test.res +++ b/tests/tests/src/bs_array_test.res @@ -287,8 +287,8 @@ let () = { eq(__LOC__, sumUsingForEach([0, 1, 2, 3, 4]), 10) b(__LOC__, !A.every([0, 1, 2, 3, 4], x => x > 2)) b(__LOC__, A.some([1, 3, 7, 8], x => mod(x, 2) == 0)) - b(__LOC__, \"@@"(not, A.some([1, 3, 7], x => mod(x, 2) == 0))) - b(__LOC__, \"@@"(not, A.eq([0, 1], [1], \"="))) + b(__LOC__, !A.some([1, 3, 7], x => mod(x, 2) == 0)) + b(__LOC__, !A.eq([0, 1], [1], \"=")) b( __LOC__, { diff --git a/tests/tests/src/bs_mutable_set_test.mjs b/tests/tests/src/bs_mutable_set_test.mjs index 60390f5ff3..8a2f59ddde 100644 --- a/tests/tests/src/bs_mutable_set_test.mjs +++ b/tests/tests/src/bs_mutable_set_test.mjs @@ -210,11 +210,11 @@ let dd = Belt_MutableSetInt.intersect(aa$2, bb$2); b("File \"bs_mutable_set_test.res\", line 128, characters 8-15", Belt_MutableSetInt.eq(dd, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); -b("File \"bs_mutable_set_test.res\", line 130, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); +b("File \"bs_mutable_set_test.res\", line 129, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); -b("File \"bs_mutable_set_test.res\", line 137, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); +b("File \"bs_mutable_set_test.res\", line 130, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); -b("File \"bs_mutable_set_test.res\", line 143, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ +b("File \"bs_mutable_set_test.res\", line 131, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ 1, 3, 4, @@ -233,15 +233,15 @@ b("File \"bs_mutable_set_test.res\", line 143, characters 8-15", Belt_MutableSet 5 ]))); -b("File \"bs_mutable_set_test.res\", line 144, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa$2, bb$2), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); +b("File \"bs_mutable_set_test.res\", line 132, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa$2, bb$2), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); -b("File \"bs_mutable_set_test.res\", line 145, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb$2, aa$2), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); +b("File \"bs_mutable_set_test.res\", line 133, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb$2, aa$2), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); -b("File \"bs_mutable_set_test.res\", line 147, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); +b("File \"bs_mutable_set_test.res\", line 135, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); -b("File \"bs_mutable_set_test.res\", line 154, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); +b("File \"bs_mutable_set_test.res\", line 139, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); -b("File \"bs_mutable_set_test.res\", line 162, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); +b("File \"bs_mutable_set_test.res\", line 144, characters 8-15", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); let a0 = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 1000)); @@ -255,9 +255,9 @@ let a4 = match$4[1]; let a3 = match$4[0]; -b("File \"bs_mutable_set_test.res\", line 174, characters 8-15", Belt_MutableSetInt.eq(a1, a3)); +b("File \"bs_mutable_set_test.res\", line 153, characters 8-15", Belt_MutableSetInt.eq(a1, a3)); -b("File \"bs_mutable_set_test.res\", line 175, characters 8-15", Belt_MutableSetInt.eq(a2, a4)); +b("File \"bs_mutable_set_test.res\", line 154, characters 8-15", Belt_MutableSetInt.eq(a2, a4)); Belt_List.forEach({ hd: a0, @@ -284,9 +284,9 @@ for (let i$2 = 0; i$2 <= 100000; ++i$2) { Belt_MutableSetInt.checkInvariantInternal(v$1); -b("File \"bs_mutable_set_test.res\", line 189, characters 10-17", Belt_Range.every(0, 100000, i => Belt_MutableSetInt.has(v$1, i))); +b("File \"bs_mutable_set_test.res\", line 168, characters 5-12", Belt_Range.every(0, 100000, i => Belt_MutableSetInt.has(v$1, i))); -eq("File \"bs_mutable_set_test.res\", line 190, characters 5-12", Belt_MutableSetInt.size(v$1), 100001); +eq("File \"bs_mutable_set_test.res\", line 169, characters 5-12", Belt_MutableSetInt.size(v$1), 100001); let u$1 = Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); @@ -294,15 +294,15 @@ let v$2 = Belt_MutableSetInt.make(); Belt_MutableSetInt.mergeMany(v$2, u$1); -eq("File \"bs_mutable_set_test.res\", line 197, characters 5-12", Belt_MutableSetInt.size(v$2), 91); +eq("File \"bs_mutable_set_test.res\", line 176, characters 5-12", Belt_MutableSetInt.size(v$2), 91); -eq("File \"bs_mutable_set_test.res\", line 198, characters 5-12", Belt_MutableSetInt.toArray(v$2), Array_data_util.range(30, 120)); +eq("File \"bs_mutable_set_test.res\", line 177, characters 5-12", Belt_MutableSetInt.toArray(v$2), Array_data_util.range(30, 120)); let u$2 = Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); let v$3 = Belt_MutableSetInt.fromArray(u$2); -eq("File \"bs_mutable_set_test.res\", line 204, characters 5-12", Belt_MutableSetInt.size(v$3), 100001); +eq("File \"bs_mutable_set_test.res\", line 183, characters 5-12", Belt_MutableSetInt.size(v$3), 100001); let u$3 = Array_data_util.randomRange(50000, 80000); @@ -310,7 +310,7 @@ for (let i$3 = 0, i_finish$1 = u$3.length; i$3 < i_finish$1; ++i$3) { Belt_MutableSetInt.remove(v$3, i$3); } -eq("File \"bs_mutable_set_test.res\", line 211, characters 5-12", Belt_MutableSetInt.size(v$3), 70000); +eq("File \"bs_mutable_set_test.res\", line 190, characters 5-12", Belt_MutableSetInt.size(v$3), 70000); let vv = Array_data_util.randomRange(0, 100000); @@ -318,9 +318,9 @@ for (let i$4 = 0, i_finish$2 = vv.length; i$4 < i_finish$2; ++i$4) { Belt_MutableSetInt.remove(v$3, Primitive_array.get(vv, i$4)); } -eq("File \"bs_mutable_set_test.res\", line 217, characters 5-12", Belt_MutableSetInt.size(v$3), 0); +eq("File \"bs_mutable_set_test.res\", line 196, characters 5-12", Belt_MutableSetInt.size(v$3), 0); -b("File \"bs_mutable_set_test.res\", line 218, characters 4-11", Belt_MutableSetInt.isEmpty(v$3)); +b("File \"bs_mutable_set_test.res\", line 197, characters 4-11", Belt_MutableSetInt.isEmpty(v$3)); let v$4 = Belt_MutableSetInt.fromArray(Belt_Array.makeBy(30, i => i)); @@ -328,13 +328,13 @@ Belt_MutableSetInt.remove(v$4, 30); Belt_MutableSetInt.remove(v$4, 29); -b("File \"bs_mutable_set_test.res\", line 225, characters 4-11", 28 === Belt_MutableSetInt.maxUndefined(v$4)); +b("File \"bs_mutable_set_test.res\", line 204, characters 4-11", 28 === Belt_MutableSetInt.maxUndefined(v$4)); Belt_MutableSetInt.remove(v$4, 0); -b("File \"bs_mutable_set_test.res\", line 227, characters 4-11", 1 === Belt_MutableSetInt.minUndefined(v$4)); +b("File \"bs_mutable_set_test.res\", line 206, characters 4-11", 1 === Belt_MutableSetInt.minUndefined(v$4)); -eq("File \"bs_mutable_set_test.res\", line 228, characters 5-12", Belt_MutableSetInt.size(v$4), 28); +eq("File \"bs_mutable_set_test.res\", line 207, characters 5-12", Belt_MutableSetInt.size(v$4), 28); let vv$1 = Array_data_util.randomRange(1, 28); @@ -342,7 +342,7 @@ for (let i$5 = 0, i_finish$3 = vv$1.length; i$5 < i_finish$3; ++i$5) { Belt_MutableSetInt.remove(v$4, Primitive_array.get(vv$1, i$5)); } -eq("File \"bs_mutable_set_test.res\", line 233, characters 5-12", Belt_MutableSetInt.size(v$4), 0); +eq("File \"bs_mutable_set_test.res\", line 212, characters 5-12", Belt_MutableSetInt.size(v$4), 0); function id(loc, x) { let u = Belt_MutableSetInt.fromSortedArrayUnsafe(x); @@ -350,29 +350,29 @@ function id(loc, x) { b(loc, Belt_Array.every2(Belt_MutableSetInt.toArray(u), x, (prim0, prim1) => prim0 === prim1)); } -id("File \"bs_mutable_set_test.res\", line 243, characters 5-12", []); +id("File \"bs_mutable_set_test.res\", line 222, characters 5-12", []); -id("File \"bs_mutable_set_test.res\", line 244, characters 5-12", [0]); +id("File \"bs_mutable_set_test.res\", line 223, characters 5-12", [0]); -id("File \"bs_mutable_set_test.res\", line 245, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 224, characters 5-12", [ 0, 1 ]); -id("File \"bs_mutable_set_test.res\", line 246, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 225, characters 5-12", [ 0, 1, 2 ]); -id("File \"bs_mutable_set_test.res\", line 247, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 226, characters 5-12", [ 0, 1, 2, 3 ]); -id("File \"bs_mutable_set_test.res\", line 248, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 227, characters 5-12", [ 0, 1, 2, @@ -380,7 +380,7 @@ id("File \"bs_mutable_set_test.res\", line 248, characters 5-12", [ 4 ]); -id("File \"bs_mutable_set_test.res\", line 249, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 228, characters 5-12", [ 0, 1, 2, @@ -389,7 +389,7 @@ id("File \"bs_mutable_set_test.res\", line 249, characters 5-12", [ 5 ]); -id("File \"bs_mutable_set_test.res\", line 250, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 229, characters 5-12", [ 0, 1, 2, @@ -398,7 +398,7 @@ id("File \"bs_mutable_set_test.res\", line 250, characters 5-12", [ 6 ]); -id("File \"bs_mutable_set_test.res\", line 251, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 230, characters 5-12", [ 0, 1, 2, @@ -408,7 +408,7 @@ id("File \"bs_mutable_set_test.res\", line 251, characters 5-12", [ 7 ]); -id("File \"bs_mutable_set_test.res\", line 252, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 231, characters 5-12", [ 0, 1, 2, @@ -419,7 +419,7 @@ id("File \"bs_mutable_set_test.res\", line 252, characters 5-12", [ 8 ]); -id("File \"bs_mutable_set_test.res\", line 253, characters 5-12", [ +id("File \"bs_mutable_set_test.res\", line 232, characters 5-12", [ 0, 1, 2, @@ -431,7 +431,7 @@ id("File \"bs_mutable_set_test.res\", line 253, characters 5-12", [ 9 ]); -id("File \"bs_mutable_set_test.res\", line 254, characters 5-12", Array_data_util.range(0, 1000)); +id("File \"bs_mutable_set_test.res\", line 233, characters 5-12", Array_data_util.range(0, 1000)); let v$5 = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 1000)); @@ -445,15 +445,15 @@ for (let i$6 = 0; i$6 <= 200; ++i$6) { Belt_MutableSetInt.remove(v$5, i$6); } -eq("File \"bs_mutable_set_test.res\", line 265, characters 5-12", Belt_MutableSetInt.size(copyV), 126); +eq("File \"bs_mutable_set_test.res\", line 244, characters 5-12", Belt_MutableSetInt.size(copyV), 126); -eq("File \"bs_mutable_set_test.res\", line 266, characters 5-12", Belt_MutableSetInt.toArray(copyV), Belt_Array.makeBy(126, i => (i << 3))); +eq("File \"bs_mutable_set_test.res\", line 245, characters 5-12", Belt_MutableSetInt.toArray(copyV), Belt_Array.makeBy(126, i => (i << 3))); -eq("File \"bs_mutable_set_test.res\", line 267, characters 5-12", Belt_MutableSetInt.size(v$5), 800); +eq("File \"bs_mutable_set_test.res\", line 246, characters 5-12", Belt_MutableSetInt.size(v$5), 800); -b("File \"bs_mutable_set_test.res\", line 268, characters 4-11", Belt_MutableSetInt.eq(copyV, match$5[0])); +b("File \"bs_mutable_set_test.res\", line 247, characters 4-11", Belt_MutableSetInt.eq(copyV, match$5[0])); -b("File \"bs_mutable_set_test.res\", line 269, characters 4-11", Belt_MutableSetInt.eq(cc$1, match$5[1])); +b("File \"bs_mutable_set_test.res\", line 248, characters 4-11", Belt_MutableSetInt.eq(cc$1, match$5[1])); let v$6 = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 1000)); @@ -461,9 +461,9 @@ let match$6 = Belt_MutableSetInt.split(v$6, 400); let match$7 = match$6[0]; -b("File \"bs_mutable_set_test.res\", line 275, characters 4-11", Belt_MutableSetInt.eq(match$7[0], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 399)))); +b("File \"bs_mutable_set_test.res\", line 254, characters 4-11", Belt_MutableSetInt.eq(match$7[0], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 399)))); -b("File \"bs_mutable_set_test.res\", line 276, characters 4-11", Belt_MutableSetInt.eq(match$7[1], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(401, 1000)))); +b("File \"bs_mutable_set_test.res\", line 255, characters 4-11", Belt_MutableSetInt.eq(match$7[1], Belt_MutableSetInt.fromArray(Array_data_util.randomRange(401, 1000)))); let d = Belt_MutableSetInt.fromArray(Belt_Array.map(Array_data_util.randomRange(0, 1000), x => (x << 1))); @@ -471,9 +471,9 @@ let match$8 = Belt_MutableSetInt.split(d, 1001); let match$9 = match$8[0]; -b("File \"bs_mutable_set_test.res\", line 279, characters 4-11", Belt_MutableSetInt.eq(match$9[0], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(501, x => (x << 1))))); +b("File \"bs_mutable_set_test.res\", line 258, characters 4-11", Belt_MutableSetInt.eq(match$9[0], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(501, x => (x << 1))))); -b("File \"bs_mutable_set_test.res\", line 280, characters 4-11", Belt_MutableSetInt.eq(match$9[1], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(500, x => 1002 + (x << 1) | 0)))); +b("File \"bs_mutable_set_test.res\", line 259, characters 4-11", Belt_MutableSetInt.eq(match$9[1], Belt_MutableSetInt.fromArray(Belt_Array.makeBy(500, x => 1002 + (x << 1) | 0)))); let aa$3 = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 100)); @@ -481,19 +481,19 @@ let bb$3 = Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 120)); let cc$2 = Belt_MutableSetInt.union(aa$3, bb$3); -b("File \"bs_mutable_set_test.res\", line 290, characters 4-11", Belt_MutableSetInt.eq(cc$2, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 120)))); +b("File \"bs_mutable_set_test.res\", line 269, characters 4-11", Belt_MutableSetInt.eq(cc$2, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 120)))); -b("File \"bs_mutable_set_test.res\", line 293, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.union(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40)))); +b("File \"bs_mutable_set_test.res\", line 272, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.union(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40)))); let dd$1 = Belt_MutableSetInt.intersect(aa$3, bb$3); -b("File \"bs_mutable_set_test.res\", line 297, characters 4-11", Belt_MutableSetInt.eq(dd$1, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); +b("File \"bs_mutable_set_test.res\", line 276, characters 4-11", Belt_MutableSetInt.eq(dd$1, Belt_MutableSetInt.fromArray(Array_data_util.randomRange(40, 100)))); -b("File \"bs_mutable_set_test.res\", line 299, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); +b("File \"bs_mutable_set_test.res\", line 277, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.make())); -b("File \"bs_mutable_set_test.res\", line 303, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); +b("File \"bs_mutable_set_test.res\", line 278, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.make())); -b("File \"bs_mutable_set_test.res\", line 306, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ +b("File \"bs_mutable_set_test.res\", line 279, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.intersect(Belt_MutableSetInt.fromArray([ 1, 3, 4, @@ -512,15 +512,15 @@ b("File \"bs_mutable_set_test.res\", line 306, characters 4-11", Belt_MutableSet 5 ]))); -b("File \"bs_mutable_set_test.res\", line 307, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa$3, bb$3), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); +b("File \"bs_mutable_set_test.res\", line 280, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(aa$3, bb$3), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 39)))); -b("File \"bs_mutable_set_test.res\", line 308, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb$3, aa$3), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); +b("File \"bs_mutable_set_test.res\", line 281, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(bb$3, aa$3), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(101, 120)))); -b("File \"bs_mutable_set_test.res\", line 310, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); +b("File \"bs_mutable_set_test.res\", line 283, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40)))); -b("File \"bs_mutable_set_test.res\", line 317, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); +b("File \"bs_mutable_set_test.res\", line 287, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(21, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)))); -b("File \"bs_mutable_set_test.res\", line 325, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); +b("File \"bs_mutable_set_test.res\", line 292, characters 4-11", Belt_MutableSetInt.eq(Belt_MutableSetInt.diff(Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 20)), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, 40))), Belt_MutableSetInt.fromArray(Array_data_util.randomRange(0, -1)))); Mt.from_pair_suites("Bs_mutable_set_test", suites.contents); diff --git a/tests/tests/src/bs_mutable_set_test.res b/tests/tests/src/bs_mutable_set_test.res index bfab257666..65b7ab93a5 100644 --- a/tests/tests/src/bs_mutable_set_test.res +++ b/tests/tests/src/bs_mutable_set_test.res @@ -126,44 +126,23 @@ include ( ) let dd = N.intersect(aa, bb) b(__LOC__, \"=~"(dd, f(I.randomRange(40, 100)))) - b( - __LOC__, - \"=~"( - N.intersect(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(21, 40))), - empty(), - ), - ) - b( - __LOC__, - \"=~"( - N.intersect(\"@@"(f, I.randomRange(21, 40)), \"@@"(f, I.randomRange(0, 20))), - empty(), - ), - ) + b(__LOC__, \"=~"(N.intersect(f(I.randomRange(0, 20)), f(I.randomRange(21, 40))), empty())) + b(__LOC__, \"=~"(N.intersect(f(I.randomRange(21, 40)), f(I.randomRange(0, 20))), empty())) b(__LOC__, \"=~"(N.intersect(f([1, 3, 4, 5, 7, 9]), f([2, 4, 5, 6, 8, 10])), f([4, 5]))) b(__LOC__, \"=~"(N.diff(aa, bb), f(I.randomRange(0, 39)))) b(__LOC__, \"=~"(N.diff(bb, aa), f(I.randomRange(101, 120)))) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(21, 40)), \"@@"(f, I.randomRange(0, 20))), - f(I.randomRange(21, 40)), - ), + \"=~"(N.diff(f(I.randomRange(21, 40)), f(I.randomRange(0, 20))), f(I.randomRange(21, 40))), ) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(21, 40))), - f(I.randomRange(0, 20)), - ), + \"=~"(N.diff(f(I.randomRange(0, 20)), f(I.randomRange(21, 40))), f(I.randomRange(0, 20))), ) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(0, 40))), - f(I.randomRange(0, -1)), - ), + \"=~"(N.diff(f(I.randomRange(0, 20)), f(I.randomRange(0, 40))), f(I.randomRange(0, -1))), ) } @@ -186,7 +165,7 @@ let () = { N.add(v, i) } N.checkInvariantInternal(v) - \"@@"(b(__LOC__, ...), R.every(0, 1_00_000, i => N.has(v, i))) + (b(__LOC__, ...))(R.every(0, 1_00_000, i => N.has(v, i))) eq(__LOC__, N.size(v), 1_00_001) } @@ -295,38 +274,23 @@ let () = { ) let dd = N.intersect(aa, bb) b(__LOC__, \"=~"(dd, f(I.randomRange(40, 100)))) - b( - __LOC__, - \"=~"(N.intersect(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(21, 40))), N.make()), - ) - b( - __LOC__, - \"=~"(N.intersect(\"@@"(f, I.randomRange(21, 40)), \"@@"(f, I.randomRange(0, 20))), N.make()), - ) + b(__LOC__, \"=~"(N.intersect(f(I.randomRange(0, 20)), f(I.randomRange(21, 40))), N.make())) + b(__LOC__, \"=~"(N.intersect(f(I.randomRange(21, 40)), f(I.randomRange(0, 20))), N.make())) b(__LOC__, \"=~"(N.intersect(f([1, 3, 4, 5, 7, 9]), f([2, 4, 5, 6, 8, 10])), f([4, 5]))) b(__LOC__, \"=~"(N.diff(aa, bb), f(I.randomRange(0, 39)))) b(__LOC__, \"=~"(N.diff(bb, aa), f(I.randomRange(101, 120)))) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(21, 40)), \"@@"(f, I.randomRange(0, 20))), - f(I.randomRange(21, 40)), - ), + \"=~"(N.diff(f(I.randomRange(21, 40)), f(I.randomRange(0, 20))), f(I.randomRange(21, 40))), ) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(21, 40))), - f(I.randomRange(0, 20)), - ), + \"=~"(N.diff(f(I.randomRange(0, 20)), f(I.randomRange(21, 40))), f(I.randomRange(0, 20))), ) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(0, 40))), - f(I.randomRange(0, -1)), - ), + \"=~"(N.diff(f(I.randomRange(0, 20)), f(I.randomRange(0, 40))), f(I.randomRange(0, -1))), ) } diff --git a/tests/tests/src/bs_poly_map_test.mjs b/tests/tests/src/bs_poly_map_test.mjs index 3497df028e..5015db4a04 100644 --- a/tests/tests/src/bs_poly_map_test.mjs +++ b/tests/tests/src/bs_poly_map_test.mjs @@ -77,13 +77,13 @@ let u0 = Belt_Map.fromArray(randomRange(0, 100), Icmp); let u1 = Belt_Map.fromArray(randomRange(30, 120), Icmp); -b("File \"bs_poly_map_test.res\", line 64, characters 4-11", Belt_Set.eq(mergeInter(u0, u1), Belt_Set.fromArray(Array_data_util.range(30, 100), Icmp))); +b("File \"bs_poly_map_test.res\", line 59, characters 4-11", Belt_Set.eq(mergeInter(u0, u1), Belt_Set.fromArray(Array_data_util.range(30, 100), Icmp))); -b("File \"bs_poly_map_test.res\", line 65, characters 4-11", Belt_Set.eq(mergeUnion(u0, u1), Belt_Set.fromArray(Array_data_util.range(0, 120), Icmp))); +b("File \"bs_poly_map_test.res\", line 60, characters 4-11", Belt_Set.eq(mergeUnion(u0, u1), Belt_Set.fromArray(Array_data_util.range(0, 120), Icmp))); -b("File \"bs_poly_map_test.res\", line 66, characters 4-11", Belt_Set.eq(mergeDiff(u0, u1), Belt_Set.fromArray(Array_data_util.range(0, 29), Icmp))); +b("File \"bs_poly_map_test.res\", line 61, characters 4-11", Belt_Set.eq(mergeDiff(u0, u1), Belt_Set.fromArray(Array_data_util.range(0, 29), Icmp))); -b("File \"bs_poly_map_test.res\", line 67, characters 4-11", Belt_Set.eq(mergeDiff(u1, u0), Belt_Set.fromArray(Array_data_util.range(101, 120), Icmp))); +b("File \"bs_poly_map_test.res\", line 62, characters 4-11", Belt_Set.eq(mergeDiff(u1, u0), Belt_Set.fromArray(Array_data_util.range(101, 120), Icmp))); let a0 = Belt_Map.fromArray(randomRange(0, 10), Icmp); @@ -110,21 +110,21 @@ let a5 = Belt_Map.remove(a0, 3); let a6 = Belt_Map.remove(a5, 3); -b("File \"bs_poly_map_test.res\", line 88, characters 4-11", a5 === a6); +b("File \"bs_poly_map_test.res\", line 83, characters 4-11", a5 === a6); -b("File \"bs_poly_map_test.res\", line 89, characters 4-11", Belt_Map.has(a0, 3)); +b("File \"bs_poly_map_test.res\", line 84, characters 4-11", Belt_Map.has(a0, 3)); -b("File \"bs_poly_map_test.res\", line 90, characters 4-11", !Belt_Map.has(a5, 3)); +b("File \"bs_poly_map_test.res\", line 85, characters 4-11", !Belt_Map.has(a5, 3)); -b("File \"bs_poly_map_test.res\", line 91, characters 4-11", 3 === Belt_Map.getUndefined(a0, 3)); +b("File \"bs_poly_map_test.res\", line 86, characters 4-11", 3 === Belt_Map.getUndefined(a0, 3)); -b("File \"bs_poly_map_test.res\", line 92, characters 4-11", 33 === Belt_Map.getUndefined(a1, 3)); +b("File \"bs_poly_map_test.res\", line 87, characters 4-11", 33 === Belt_Map.getUndefined(a1, 3)); -b("File \"bs_poly_map_test.res\", line 93, characters 4-11", Belt_Map.getUndefined(a2, 3) === undefined); +b("File \"bs_poly_map_test.res\", line 88, characters 4-11", Belt_Map.getUndefined(a2, 3) === undefined); -b("File \"bs_poly_map_test.res\", line 95, characters 4-11", 11 === Belt_Map.getUndefined(a3, 3)); +b("File \"bs_poly_map_test.res\", line 90, characters 4-11", 11 === Belt_Map.getUndefined(a3, 3)); -b("File \"bs_poly_map_test.res\", line 96, characters 4-11", Belt_Map.getUndefined(a4, 3) === undefined); +b("File \"bs_poly_map_test.res\", line 91, characters 4-11", Belt_Map.getUndefined(a4, 3) === undefined); let a7 = Belt_Map.removeMany(a0, [ 7, @@ -140,22 +140,22 @@ let a7 = Belt_Map.removeMany(a0, [ 6 ]); -eq("File \"bs_poly_map_test.res\", line 99, characters 5-12", Belt_Map.keysToArray(a7), [ +eq("File \"bs_poly_map_test.res\", line 94, characters 5-12", Belt_Map.keysToArray(a7), [ 9, 10 ]); let a8 = Belt_Map.removeMany(a7, Array_data_util.randomRange(0, 100)); -b("File \"bs_poly_map_test.res\", line 101, characters 4-11", Belt_Map.isEmpty(a8)); +b("File \"bs_poly_map_test.res\", line 96, characters 4-11", Belt_Map.isEmpty(a8)); let u0$1 = Belt_Map.fromArray(randomRange(0, 100), Icmp); let u1$1 = Belt_Map.set(u0$1, 3, 32); -eq("File \"bs_poly_map_test.res\", line 107, characters 5-12", Belt_Map.get(u1$1, 3), 32); +eq("File \"bs_poly_map_test.res\", line 102, characters 5-12", Belt_Map.get(u1$1, 3), 32); -eq("File \"bs_poly_map_test.res\", line 108, characters 5-12", Belt_Map.get(u0$1, 3), 3); +eq("File \"bs_poly_map_test.res\", line 103, characters 5-12", Belt_Map.get(u0$1, 3), 3); function acc(m, is) { return Belt_Array.reduce(is, m, (a, i) => Belt_Map.update(a, i, n => { @@ -171,7 +171,7 @@ let m = Belt_Map.make(Icmp); let m1 = acc(m, Belt_Array.concat(Array_data_util.randomRange(0, 20), Array_data_util.randomRange(10, 30))); -b("File \"bs_poly_map_test.res\", line 125, characters 4-11", Belt_Map.eq(m1, Belt_Map.fromArray(Belt_Array.makeBy(31, i => [ +b("File \"bs_poly_map_test.res\", line 120, characters 4-11", Belt_Map.eq(m1, Belt_Map.fromArray(Belt_Array.makeBy(31, i => [ i, i >= 10 && i <= 20 ? 2 : 1 ]), Icmp), (x, y) => x === y)); @@ -188,7 +188,7 @@ let v2 = Belt_Map.fromArray(Belt_Array.map(Array_data_util.randomRange(0, 10000) x ]), Icmp); -b("File \"bs_poly_map_test.res\", line 149, characters 4-11", Belt_Map.eq(v1, v2, (x, y) => x === y)); +b("File \"bs_poly_map_test.res\", line 144, characters 4-11", Belt_Map.eq(v1, v2, (x, y) => x === y)); function inc(x) { if (x !== undefined) { @@ -210,25 +210,25 @@ let match$1 = match[0]; let match$2 = Belt_Map.get(v3, 10); -b("File \"bs_poly_map_test.res\", line 160, characters 4-11", match$2 !== undefined ? match$2 === 11 : false); +b("File \"bs_poly_map_test.res\", line 155, characters 4-11", match$2 !== undefined ? match$2 === 11 : false); let match$3 = Belt_Map.get(v3, -10); -b("File \"bs_poly_map_test.res\", line 167, characters 4-11", match$3 === undefined); +b("File \"bs_poly_map_test.res\", line 162, characters 4-11", match$3 === undefined); let match$4 = Belt_Map.get(v4, -10); -b("File \"bs_poly_map_test.res\", line 174, characters 4-11", match$4 !== undefined ? match$4 === 0 : false); +b("File \"bs_poly_map_test.res\", line 169, characters 4-11", match$4 !== undefined ? match$4 === 0 : false); -b("File \"bs_poly_map_test.res\", line 180, characters 4-11", Belt_Map.isEmpty(Belt_Map.remove(Belt_Map.make(Icmp), 0))); +b("File \"bs_poly_map_test.res\", line 175, characters 4-11", Belt_Map.isEmpty(Belt_Map.remove(Belt_Map.make(Icmp), 0))); -b("File \"bs_poly_map_test.res\", line 181, characters 4-11", Belt_Map.isEmpty(Belt_Map.removeMany(Belt_Map.make(Icmp), [0]))); +b("File \"bs_poly_map_test.res\", line 176, characters 4-11", Belt_Map.isEmpty(Belt_Map.removeMany(Belt_Map.make(Icmp), [0]))); -b("File \"bs_poly_map_test.res\", line 183, characters 4-11", pres !== undefined ? pres === 5000 : false); +b("File \"bs_poly_map_test.res\", line 178, characters 4-11", pres !== undefined ? pres === 5000 : false); -b("File \"bs_poly_map_test.res\", line 189, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$1[0]), Belt_Array.makeBy(5000, i => i), (prim0, prim1) => prim0 === prim1)); +b("File \"bs_poly_map_test.res\", line 184, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$1[0]), Belt_Array.makeBy(5000, i => i), (prim0, prim1) => prim0 === prim1)); -b("File \"bs_poly_map_test.res\", line 190, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$1[1]), Belt_Array.makeBy(5000, i => 5001 + i | 0), (prim0, prim1) => prim0 === prim1)); +b("File \"bs_poly_map_test.res\", line 185, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$1[1]), Belt_Array.makeBy(5000, i => 5001 + i | 0), (prim0, prim1) => prim0 === prim1)); let v7 = Belt_Map.remove(v3, 5000); @@ -236,11 +236,11 @@ let match$5 = Belt_Map.split(v7, 5000); let match$6 = match$5[0]; -b("File \"bs_poly_map_test.res\", line 195, characters 4-11", match$5[1] === undefined); +b("File \"bs_poly_map_test.res\", line 190, characters 4-11", match$5[1] === undefined); -b("File \"bs_poly_map_test.res\", line 201, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$6[0]), Belt_Array.makeBy(5000, i => i), (prim0, prim1) => prim0 === prim1)); +b("File \"bs_poly_map_test.res\", line 196, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$6[0]), Belt_Array.makeBy(5000, i => i), (prim0, prim1) => prim0 === prim1)); -b("File \"bs_poly_map_test.res\", line 202, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$6[1]), Belt_Array.makeBy(5000, i => 5001 + i | 0), (prim0, prim1) => prim0 === prim1)); +b("File \"bs_poly_map_test.res\", line 197, characters 4-11", Belt_Array.eq(Belt_Map.keysToArray(match$6[1]), Belt_Array.makeBy(5000, i => 5001 + i | 0), (prim0, prim1) => prim0 === prim1)); Mt.from_pair_suites("Bs_poly_map_test", suites.contents); diff --git a/tests/tests/src/bs_poly_map_test.res b/tests/tests/src/bs_poly_map_test.res index 76d2bbce35..89331df4a6 100644 --- a/tests/tests/src/bs_poly_map_test.res +++ b/tests/tests/src/bs_poly_map_test.res @@ -15,8 +15,7 @@ let setOfArray = x => N.fromArray(~id=module(Icmp), x) let emptyMap = () => M.make(~id=module(Icmp)) let mergeInter = (s1, s2) => - \"@@"( - setOfArray, + setOfArray( M.keysToArray( M.merge(s1, s2, (k, v1, v2) => switch (v1, v2) { @@ -28,10 +27,8 @@ let mergeInter = (s1, s2) => ) let mergeUnion = (s1, s2) => - \"@@"( - setOfArray, - \"@@"( - M.keysToArray, + setOfArray( + M.keysToArray( M.merge(s1, s2, (k, v1, v2) => switch (v1, v2) { | (None, None) => None @@ -41,10 +38,8 @@ let mergeUnion = (s1, s2) => ), ) let mergeDiff = (s1, s2) => - \"@@"( - setOfArray, - \"@@"( - M.keysToArray, + setOfArray( + M.keysToArray( M.merge(s1, s2, (k, v1, v2) => switch (v1, v2) { | (Some(_), None) => Some() diff --git a/tests/tests/src/bs_poly_mutable_set_test.mjs b/tests/tests/src/bs_poly_mutable_set_test.mjs index 4b5d186f68..a079bbab52 100644 --- a/tests/tests/src/bs_poly_mutable_set_test.mjs +++ b/tests/tests/src/bs_poly_mutable_set_test.mjs @@ -220,11 +220,11 @@ let dd = Belt_MutableSet.intersect(aa$2, bb$2); b("File \"bs_poly_mutable_set_test.res\", line 122, characters 4-11", Belt_MutableSet.eq(dd, Belt_MutableSet.fromArray(Array_data_util.randomRange(40, 100), IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 124, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.make(IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 123, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.make(IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 128, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.make(IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 124, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.make(IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 131, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray([ +b("File \"bs_poly_mutable_set_test.res\", line 125, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.intersect(Belt_MutableSet.fromArray([ 1, 3, 4, @@ -243,15 +243,15 @@ b("File \"bs_poly_mutable_set_test.res\", line 131, characters 4-11", Belt_Mutab 5 ], IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 132, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(aa$2, bb$2), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 39), IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 126, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(aa$2, bb$2), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 39), IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 133, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(bb$2, aa$2), Belt_MutableSet.fromArray(Array_data_util.randomRange(101, 120), IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 127, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(bb$2, aa$2), Belt_MutableSet.fromArray(Array_data_util.randomRange(101, 120), IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 135, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 129, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 142, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 133, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(21, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp))); -b("File \"bs_poly_mutable_set_test.res\", line 150, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, -1), IntCmp))); +b("File \"bs_poly_mutable_set_test.res\", line 138, characters 4-11", Belt_MutableSet.eq(Belt_MutableSet.diff(Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 20), IntCmp), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 40), IntCmp)), Belt_MutableSet.fromArray(Array_data_util.randomRange(0, -1), IntCmp))); let a0 = Belt_MutableSet.fromArray(Array_data_util.randomRange(0, 1000), IntCmp); @@ -265,9 +265,9 @@ let a4 = match$4[1]; let a3 = match$4[0]; -b("File \"bs_poly_mutable_set_test.res\", line 162, characters 4-11", Belt_MutableSet.eq(a1, a3)); +b("File \"bs_poly_mutable_set_test.res\", line 147, characters 4-11", Belt_MutableSet.eq(a1, a3)); -b("File \"bs_poly_mutable_set_test.res\", line 163, characters 4-11", Belt_MutableSet.eq(a2, a4)); +b("File \"bs_poly_mutable_set_test.res\", line 148, characters 4-11", Belt_MutableSet.eq(a2, a4)); Belt_List.forEach({ hd: a0, diff --git a/tests/tests/src/bs_poly_mutable_set_test.res b/tests/tests/src/bs_poly_mutable_set_test.res index a4789a42f0..fd3f60d1ac 100644 --- a/tests/tests/src/bs_poly_mutable_set_test.res +++ b/tests/tests/src/bs_poly_mutable_set_test.res @@ -120,38 +120,23 @@ let () = { ) let dd = N.intersect(aa, bb) b(__LOC__, \"=~"(dd, f(I.randomRange(40, 100)))) - b( - __LOC__, - \"=~"(N.intersect(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(21, 40))), empty()), - ) - b( - __LOC__, - \"=~"(N.intersect(\"@@"(f, I.randomRange(21, 40)), \"@@"(f, I.randomRange(0, 20))), empty()), - ) + b(__LOC__, \"=~"(N.intersect(f(I.randomRange(0, 20)), f(I.randomRange(21, 40))), empty())) + b(__LOC__, \"=~"(N.intersect(f(I.randomRange(21, 40)), f(I.randomRange(0, 20))), empty())) b(__LOC__, \"=~"(N.intersect(f([1, 3, 4, 5, 7, 9]), f([2, 4, 5, 6, 8, 10])), f([4, 5]))) b(__LOC__, \"=~"(N.diff(aa, bb), f(I.randomRange(0, 39)))) b(__LOC__, \"=~"(N.diff(bb, aa), f(I.randomRange(101, 120)))) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(21, 40)), \"@@"(f, I.randomRange(0, 20))), - f(I.randomRange(21, 40)), - ), + \"=~"(N.diff(f(I.randomRange(21, 40)), f(I.randomRange(0, 20))), f(I.randomRange(21, 40))), ) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(21, 40))), - f(I.randomRange(0, 20)), - ), + \"=~"(N.diff(f(I.randomRange(0, 20)), f(I.randomRange(21, 40))), f(I.randomRange(0, 20))), ) b( __LOC__, - \"=~"( - N.diff(\"@@"(f, I.randomRange(0, 20)), \"@@"(f, I.randomRange(0, 40))), - f(I.randomRange(0, -1)), - ), + \"=~"(N.diff(f(I.randomRange(0, 20)), f(I.randomRange(0, 40))), f(I.randomRange(0, -1))), ) } diff --git a/tests/tests/src/bs_poly_set_test.res b/tests/tests/src/bs_poly_set_test.res index f5d2aded12..d6dd31a1f9 100644 --- a/tests/tests/src/bs_poly_set_test.res +++ b/tests/tests/src/bs_poly_set_test.res @@ -53,7 +53,7 @@ let () = { eq(__LOC__, N.size(u14), 10000) eq(__LOC__, N.size(u15), 1) b(__LOC__, N.has(u15, 20000)) - b(__LOC__, \"@@"(not, N.has(u15, 2000))) + b(__LOC__, !N.has(u15, 2000)) b(__LOC__, N.isEmpty(u16)) let u17 = N.fromArray(~id=module(IntCmp), I.randomRange(0, 100)) let u18 = N.fromArray(~id=module(IntCmp), I.randomRange(59, 200)) @@ -115,7 +115,7 @@ let () = { b(__LOC__, N.every(u0, x => x < 24)) b(__LOC__, D.every(N.getData(u0), x => x < 24)) b(__LOC__, !N.every(u2, x => x < 24)) - b(__LOC__, \"@@"(not, N.every(N.fromArray(~id=module(IntCmp), [1, 2, 3]), x => x == 2))) + b(__LOC__, !N.every(N.fromArray(~id=module(IntCmp), [1, 2, 3]), x => x == 2)) b(__LOC__, N.cmp(u1, u0) < 0) b(__LOC__, N.cmp(u0, u1) > 0) } @@ -128,10 +128,10 @@ let () = { b(__LOC__, N.eq(a2, a4)) eq(__LOC__, N.getExn(a0, 3), 3) eq(__LOC__, N.getExn(a0, 4), 4) - t(__LOC__, _ => \"@@"(ignore, N.getExn(a0, 1002))) - t(__LOC__, _ => \"@@"(ignore, N.getExn(a0, -1))) + t(__LOC__, _ => ignore(N.getExn(a0, 1002))) + t(__LOC__, _ => ignore(N.getExn(a0, -1))) eq(__LOC__, N.size(a0), 1001) - b(__LOC__, \"@@"(not, N.isEmpty(a0))) + b(__LOC__, !N.isEmpty(a0)) let ((a5, a6), pres) = N.split(a0, 200) b(__LOC__, pres) eq(__LOC__, N.toArray(a5), A.makeBy(200, i => i)) diff --git a/tests/tests/src/bs_qualified.res b/tests/tests/src/bs_qualified.res index 96096477aa..425bf2fedc 100644 --- a/tests/tests/src/bs_qualified.res +++ b/tests/tests/src/bs_qualified.res @@ -72,21 +72,21 @@ type t @send @scope(("a0", "a1")) external psend3: (t, int) => unit = "psend3" let f3 = x => { - \"@@"(ignore, makeBuffer(20)) - \"@@"(ignore, makeBuffer1(20)) - \"@@"(ignore, makeBuffer2(100)) - \"@@"(ignore, makeBuffer3(20)) - \"@@"(Js.log, max(1.0, 2.0)) + ignore(makeBuffer(20)) + ignore(makeBuffer1(20)) + ignore(makeBuffer2(100)) + ignore(makeBuffer3(20)) + Js.log(max(1.0, 2.0)) /* Js.log @@ scope_f x ; */ - \"@@"(Js.log, getMockFn1(x, 0)) - \"@@"(Js.log, getMockFn2(x, 0)) - \"@@"(Js.log, getMockFn3(x, 0)) + Js.log(getMockFn1(x, 0)) + Js.log(getMockFn2(x, 0)) + Js.log(getMockFn3(x, 0)) setMocFn1(x, 0, "x") setMocFn2(x, 0, "x") setMocFn3(x, 0, "x") - \"@@"(Js.log, getX1(x)) - \"@@"(Js.log, getX2(x)) - \"@@"(Js.log, getX3(x)) + Js.log(getX1(x)) + Js.log(getX2(x)) + Js.log(getX3(x)) setX1(x, 0) setX2(x, 0) diff --git a/tests/tests/src/bs_splice_partial.res b/tests/tests/src/bs_splice_partial.res index cfa53ad332..58938b6bf7 100644 --- a/tests/tests/src/bs_splice_partial.res +++ b/tests/tests/src/bs_splice_partial.res @@ -37,14 +37,14 @@ type id2 = int => int let test_cb = x => { ignore((x->cb("hI", [1, 2, 3]))(3)) - \"@@"(ignore, cb(x, "hI", [1, 2, 3])(3)) + ignore(cb(x, "hI", [1, 2, 3])(3)) cb2(x, "hI", [1, 2, 3])(3) } type u = int => int @val external v: u = "v" -let f = x => \"@@"(ignore, v(x)) +let f = x => ignore(v(x)) @val external fff0: (int, int, @as(json`[undefined,undefined]`) _) => int = "say" diff --git a/tests/tests/src/coercion_module_alias_test.res b/tests/tests/src/coercion_module_alias_test.res index 70cfb77cfb..bc82a64f8d 100644 --- a/tests/tests/src/coercion_module_alias_test.res +++ b/tests/tests/src/coercion_module_alias_test.res @@ -4,17 +4,17 @@ let l = Js.log module C = Char module C': module type of Char = C -\"@@"(l, C'.chr(66)) +l(C'.chr(66)) module C''': module type of C = C' /* fails */ module C'': module type of Char = C -\"@@"(l, C''.chr(66)) +l(C''.chr(66)) module C3 = { include Char } -\"@@"(l, C3.chr(66)) +l(C3.chr(66)) let f = x => { module M = { @@ -29,7 +29,7 @@ let g = x => { module F = (X: {}) => Char module C4 = F() -\"@@"(l, C4.chr(66)) +l(C4.chr(66)) module G = (X: {}) => X /* does not alias X */ module M = G() @@ -40,14 +40,14 @@ module M' = { } module N' = N } -\"@@"(l, M'.N'.x) +l(M'.N'.x) module M'': { module N': { let x: int } } = (M') -\"@@"(l, M''.N'.x) +l(M''.N'.x) module M2 = { include M' } @@ -58,13 +58,13 @@ module M3: { } = { include M' } -\"@@"(l, M3.N'.x) +l(M3.N'.x) module M3': { module N': { let x: int } } = (M2) -\"@@"(l, M3'.N'.x) +l(M3'.N'.x) module M4: { module N': { @@ -76,7 +76,7 @@ module M4: { } module N' = N } -\"@@"(l, M4.N'.x) +l(M4.N'.x) module F0 = (X: {}) => { module N = { @@ -91,7 +91,7 @@ module G0: (X: {}) => } } = F0 module M5 = G0() -\"@@"(l, M5.N'.x) +l(M5.N'.x) module M6 = { module D = { @@ -109,7 +109,7 @@ module M1: { } module N' = N } = M6 -\"@@"(l, M1.N'.x) +l(M1.N'.x) module M7: { module N': { let x: int @@ -120,10 +120,10 @@ module M7: { } module N' = N }) -\"@@"(l, M7.N'.x) +l(M7.N'.x) open M6 -\"@@"(l, N'.x) +l(N'.x) module M8 = { module C = Char @@ -135,7 +135,7 @@ module M9: { } module C' = C } = M8 -\"@@"(l, M9.C'.chr(66)) +l(M9.C'.chr(66)) module M10: { module C': { let chr: int => char @@ -146,4 +146,4 @@ module M10: { } module C' = C }) -\"@@"(l, M10.C'.chr(66)) +l(M10.C'.chr(66)) diff --git a/tests/tests/src/custom_error_test.res b/tests/tests/src/custom_error_test.res index b99ee46fe2..78a24a1dda 100644 --- a/tests/tests/src/custom_error_test.res +++ b/tests/tests/src/custom_error_test.res @@ -1,7 +1,7 @@ let test_js_error = () => switch Js.Json.parseExn(` {"x" : }`) { | exception Js.Exn.Error(err) => - \"@@"(Js.log, Js.Exn.stack(err)) + Js.log(Js.Exn.stack(err)) None | e => Some(e) } @@ -9,14 +9,14 @@ let test_js_error = () => let test_js_error2 = () => try Js.Json.parseExn(` {"x" : }`) catch { | Js.Exn.Error(err) as e => - \"@@"(Js.log, Js.Exn.stack(err)) + Js.log(Js.Exn.stack(err)) raise(e) } let example1 = () => switch Js.Json.parseExn(` {"x" }`) { | exception Js.Exn.Error(err) => - \"@@"(Js.log, Js.Exn.stack(err)) + Js.log(Js.Exn.stack(err)) None | v => Some(v) } diff --git a/tests/tests/src/debugger_test.res b/tests/tests/src/debugger_test.res index af0252e36d..b4081074f0 100644 --- a/tests/tests/src/debugger_test.res +++ b/tests/tests/src/debugger_test.res @@ -4,18 +4,18 @@ let f = (x, y) => { } let g = () => { - \"@@"(ignore, f(1, 2)) + ignore(f(1, 2)) %debugger - \"@@"(ignore, f(1, 2)) + ignore(f(1, 2)) %debugger 3 } let exterme_g = () => { - \"@@"(ignore, f(1, 2)) + ignore(f(1, 2)) let v = %debugger Js.log(v) - \"@@"(ignore, f(1, 2)) + ignore(f(1, 2)) %debugger 3 } diff --git a/tests/tests/src/derive_projector_test.res b/tests/tests/src/derive_projector_test.res index 3630a093fa..55f16f2911 100644 --- a/tests/tests/src/derive_projector_test.res +++ b/tests/tests/src/derive_projector_test.res @@ -15,7 +15,7 @@ and u = Hei and h = {d: d, h: list, u_X: int} @deriving({accessors: accessors}) and e = {d: d} -let v = \"@@"(d, {d: d_int(3)}) +let v = d({d: d_int(3)}) let g = u_X diff --git a/tests/tests/src/exception_rebound_err_test.res b/tests/tests/src/exception_rebound_err_test.res index 3415599e4b..b66fc54b1f 100644 --- a/tests/tests/src/exception_rebound_err_test.res +++ b/tests/tests/src/exception_rebound_err_test.res @@ -15,7 +15,7 @@ exception C(int, int) let test_js_error4 = () => try { - \"@@"(ignore, Js.Json.parseExn(` {"x"}`)) + ignore(Js.Json.parseExn(` {"x"}`)) 1 } catch { | Not_found => 2 diff --git a/tests/tests/src/exception_value_test.res b/tests/tests/src/exception_value_test.res index 9f82ae3dcf..b5b753e290 100644 --- a/tests/tests/src/exception_value_test.res +++ b/tests/tests/src/exception_value_test.res @@ -25,13 +25,13 @@ let test_not_found = (f, ()) => let test_js_error2 = () => try Js.Json.parseExn(` {"x" : }`) catch { | Js.Exn.Error(err) as e => - \"@@"(Js.log, Js.Exn.stack(err)) + Js.log(Js.Exn.stack(err)) raise(e) } let test_js_error3 = () => try { - \"@@"(ignore, Js.Json.parseExn(` {"x"}`)) + ignore(Js.Json.parseExn(` {"x"}`)) 1 } catch { | e => 0 diff --git a/tests/tests/src/ffi_js_test.res b/tests/tests/src/ffi_js_test.res index c47353cdb8..165228a637 100644 --- a/tests/tests/src/ffi_js_test.res +++ b/tests/tests/src/ffi_js_test.res @@ -94,7 +94,7 @@ let ffff = x => { switch getGADTI3(x, Int, Str) { | (cc, dd) => Js.log((cc, dd)) } - \"@@"(Js.log, getGADT(x, Int)) + Js.log(getGADT(x, Int)) switch getGADT2(x, Int, Str) { | (a: int, b: string) => Js.log2(a, b) } diff --git a/tests/tests/src/flexible_array_test.res b/tests/tests/src/flexible_array_test.res index 0704e270a8..95b178dab2 100644 --- a/tests/tests/src/flexible_array_test.res +++ b/tests/tests/src/flexible_array_test.res @@ -163,8 +163,8 @@ module Int_array: { s } else { let head = get(s, 0) - let larger = \"@@"(sort, filter_from(1, x => x > head, s)) - let smaller = \"@@"(sort, filter_from(1, x => x <= head, s)) + let larger = sort(filter_from(1, x => x > head, s)) + let smaller = sort(filter_from(1, x => x <= head, s)) append(smaller, push_front(larger, head)) } } diff --git a/tests/tests/src/for_loop_test.res b/tests/tests/src/for_loop_test.res index 057b78dbf0..012119a7e5 100644 --- a/tests/tests/src/for_loop_test.res +++ b/tests/tests/src/for_loop_test.res @@ -91,10 +91,7 @@ let for_8 = () => { let for_9 = () => { let (collect, get) = { let v: ref> = ref(list{}) - ( - x => v := list{x, ...v.contents}, - () => \"@@"(Belt.List.toArray, Belt.List.reverse(v.contents)), - ) + (x => v := list{x, ...v.contents}, () => Belt.List.toArray(Belt.List.reverse(v.contents))) } let i_len = 2 @@ -161,8 +158,8 @@ console.log(result,u) */ let suites = list{ - ("for_loop_test_3", _ => Mt.Eq(90, \"@@"(for_3, Belt.Array.make(10, 2)))), - ("for_loop_test_4", _ => Mt.Eq(180, \"@@"(for_4, Belt.Array.make(10, 2)))), + ("for_loop_test_3", _ => Mt.Eq(90, for_3(Belt.Array.make(10, 2)))), + ("for_loop_test_4", _ => Mt.Eq(180, for_4(Belt.Array.make(10, 2)))), ("for_loop_test_5", _ => Mt.Eq(2420, for_5(Belt.Array.make(10, 2), 11))), ("for_loop_test_6", _ => Mt.Eq([30, 1, 2, 3], for_6(Belt.Array.make(3, 0), 0))), ("for_loop_test_7", _ => Mt.Eq(84, for_7())), diff --git a/tests/tests/src/functor_ffi.res b/tests/tests/src/functor_ffi.res index c5de0aab39..8dd7920ef3 100644 --- a/tests/tests/src/functor_ffi.res +++ b/tests/tests/src/functor_ffi.res @@ -9,7 +9,7 @@ module Make = ( @get_index external get: (t, int) => Js.undefined = "" - let opt_get = (f, i) => \"@@"(Js.Undefined.toOption, get(f, i)) + let opt_get = (f, i) => Js.Undefined.toOption(get(f, i)) } module Int_arr = Make({ diff --git a/tests/tests/src/gpr_1698_test.res b/tests/tests/src/gpr_1698_test.res index b49992f479..37e09f9a56 100644 --- a/tests/tests/src/gpr_1698_test.res +++ b/tests/tests/src/gpr_1698_test.res @@ -44,4 +44,4 @@ let a = Sum(list{sym("a"), Val(Natural(2))}) let b = sym("x") type st = {complex: bool} let empty = () => {complex: true} -let _ = \"@@"(Js.log, compare(InSum, empty(), a, b)) +let _ = Js.log(compare(InSum, empty(), a, b)) diff --git a/tests/tests/src/gpr_1946_test.res b/tests/tests/src/gpr_1946_test.res index dce60f16c2..54919e2dc8 100644 --- a/tests/tests/src/gpr_1946_test.res +++ b/tests/tests/src/gpr_1946_test.res @@ -23,6 +23,6 @@ let f = id => { eq(__LOC__, ({"_5": 3})["_5"], 3) eq(__LOC__, (2, 3), (f(h).a, f(h).b)) -\"@@"(Js.log, Obj.tag(Obj.repr({"_5": 3}))) +Js.log(Obj.tag(Obj.repr({"_5": 3}))) Mt.from_pair_suites(__LOC__, suites.contents) diff --git a/tests/tests/src/gpr_3697_test.res b/tests/tests/src/gpr_3697_test.res index 22ff1d684e..f6e55b04bb 100644 --- a/tests/tests/src/gpr_3697_test.res +++ b/tests/tests/src/gpr_3697_test.res @@ -2,7 +2,7 @@ type rec t<'a> = Fix(Lazy.t>) let rec fix = () => Fix(Lazy.from_fun(fix)) -let rec unfixLeak = (Fix(f)) => \"@@"(unfixLeak, Lazy.force(f)) +let rec unfixLeak = (Fix(f)) => unfixLeak(Lazy.force(f)) let unfix = p => while true { diff --git a/tests/tests/src/int_overflow_test.res b/tests/tests/src/int_overflow_test.res index 8a949d089f..8b45277c02 100644 --- a/tests/tests/src/int_overflow_test.res +++ b/tests/tests/src/int_overflow_test.res @@ -75,8 +75,8 @@ Mt.from_pair_suites( (__LOC__, _ => Eq(hash_variant2("xxyyzxzzyy"), -449896130)), ("int_literal_flow", _ => Eq(-1, 0xffffffff)), ("int_literal_flow2", _ => Eq(-1, 0xfffffffff)), - (__LOC__, _ => Eq(\"@@"(int_of_float, Js.Float.fromString("3")), 3)), + (__LOC__, _ => Eq(int_of_float(Js.Float.fromString("3")), 3)), /* FIXME */ - (__LOC__, _ => Eq(\"@@"(int_of_float, Js.Float.fromString("3.2")), 3)), + (__LOC__, _ => Eq(int_of_float(Js.Float.fromString("3.2")), 3)), }, ) diff --git a/tests/tests/src/js_float_test.res b/tests/tests/src/js_float_test.res index f8d855ca65..911a267b72 100644 --- a/tests/tests/src/js_float_test.res +++ b/tests/tests/src/js_float_test.res @@ -24,10 +24,10 @@ let suites = { "toExponentialWithPrecision - digits:20", _ => Eq("0.00000000000000000000e+0", toExponentialWithPrecision(0., ~digits=20)), ), - (__LOC__, _ => ThrowAny(() => \"@@"(ignore, toExponentialWithPrecision(0., ~digits=101)))), + (__LOC__, _ => ThrowAny(() => ignore(toExponentialWithPrecision(0., ~digits=101)))), ( "toExponentialWithPrecision - digits:-1", - _ => ThrowAny(() => \"@@"(ignore, toExponentialWithPrecision(0., ~digits=-1))), + _ => ThrowAny(() => ignore(toExponentialWithPrecision(0., ~digits=-1))), ), ("toFixed", _ => Eq("123", toFixed(123.456))), ("toFixed - large number", _ => Eq("1.2e+21", toFixed(1.2e21))), @@ -45,11 +45,11 @@ let suites = { ), ( "toFixedWithPrecision - digits:101", - _ => ThrowAny(() => \"@@"(ignore, toFixedWithPrecision(0., ~digits=101))), + _ => ThrowAny(() => ignore(toFixedWithPrecision(0., ~digits=101))), ), ( "toFixedWithPrecision - digits:-1", - _ => ThrowAny(() => \"@@"(ignore, toFixedWithPrecision(0., ~digits=-1))), + _ => ThrowAny(() => ignore(toFixedWithPrecision(0., ~digits=-1))), ), ("toPrecision", _ => Eq("123.456", toPrecision(123.456))), ("toPrecision - large number", _ => Eq("1.2e+21", toPrecision(1.2e21))), @@ -65,10 +65,10 @@ let suites = { "toPrecisionWithPrecision - digits:20", _ => Eq("0.0000000000000000000", toPrecisionWithPrecision(0., ~digits=20)), ), - (__LOC__, _ => ThrowAny(() => \"@@"(ignore, toPrecisionWithPrecision(0., ~digits=101)))), + (__LOC__, _ => ThrowAny(() => ignore(toPrecisionWithPrecision(0., ~digits=101)))), ( "toPrecisionWithPrecision - digits:-1", - _ => ThrowAny(() => \"@@"(ignore, toPrecisionWithPrecision(0., ~digits=-1))), + _ => ThrowAny(() => ignore(toPrecisionWithPrecision(0., ~digits=-1))), ), ("toString", _ => Eq("1.23", toString(1.23))), ("toString - large number", _ => Eq("1.2e+21", toString(1.2e21))), @@ -84,18 +84,9 @@ let suites = { _ => Eq("7b.74bc6a7ef9dc", toStringWithRadix(123.456, ~radix=16)), ), ("toStringWithRadix - radix:36", _ => Eq("3f", toStringWithRadix(123., ~radix=36))), - ( - "toStringWithRadix - radix:37", - _ => ThrowAny(() => \"@@"(ignore, toStringWithRadix(0., ~radix=37))), - ), - ( - "toStringWithRadix - radix:1", - _ => ThrowAny(() => \"@@"(ignore, toStringWithRadix(0., ~radix=1))), - ), - ( - "toStringWithRadix - radix:-1", - _ => ThrowAny(() => \"@@"(ignore, toStringWithRadix(0., ~radix=-1))), - ), + ("toStringWithRadix - radix:37", _ => ThrowAny(() => ignore(toStringWithRadix(0., ~radix=37)))), + ("toStringWithRadix - radix:1", _ => ThrowAny(() => ignore(toStringWithRadix(0., ~radix=1)))), + ("toStringWithRadix - radix:-1", _ => ThrowAny(() => ignore(toStringWithRadix(0., ~radix=-1)))), ("fromString - 123", _ => Eq(123., fromString("123"))), ("fromString - 12.3", _ => Eq(12.3, fromString("12.3"))), ("fromString - empty string", _ => Eq(0., fromString(""))), diff --git a/tests/tests/src/js_int_test.res b/tests/tests/src/js_int_test.res index 92554452fb..312b95e8d5 100644 --- a/tests/tests/src/js_int_test.res +++ b/tests/tests/src/js_int_test.res @@ -16,10 +16,10 @@ let suites = { "toExponentialWithPrecision - digits:20", _ => Eq("0.00000000000000000000e+0", toExponentialWithPrecision(0, ~digits=20)), ), - (__LOC__, _ => ThrowAny(() => \"@@"(ignore, toExponentialWithPrecision(0, ~digits=101)))), + (__LOC__, _ => ThrowAny(() => ignore(toExponentialWithPrecision(0, ~digits=101)))), ( "toExponentialWithPrecision - digits:-1", - _ => ThrowAny(() => \"@@"(ignore, toExponentialWithPrecision(0, ~digits=-1))), + _ => ThrowAny(() => ignore(toExponentialWithPrecision(0, ~digits=-1))), ), ("toPrecision", _ => Eq("123456", toPrecision(123456))), ( @@ -34,10 +34,10 @@ let suites = { "toPrecisionWithPrecision - digits:20", _ => Eq("0.0000000000000000000", toPrecisionWithPrecision(0, ~digits=20)), ), - (__LOC__, _ => ThrowAny(() => \"@@"(ignore, toPrecisionWithPrecision(0, ~digits=101)))), + (__LOC__, _ => ThrowAny(() => ignore(toPrecisionWithPrecision(0, ~digits=101)))), ( "toPrecisionWithPrecision - digits:-1", - _ => ThrowAny(() => \"@@"(ignore, toPrecisionWithPrecision(0, ~digits=-1))), + _ => ThrowAny(() => ignore(toPrecisionWithPrecision(0, ~digits=-1))), ), ("toString", _ => Eq("123", toString(123))), ( @@ -46,18 +46,9 @@ let suites = { ), ("toStringWithRadix - radix:16", _ => Eq("1e240", toStringWithRadix(123456, ~radix=16))), ("toStringWithRadix - radix:36", _ => Eq("2n9c", toStringWithRadix(123456, ~radix=36))), - ( - "toStringWithRadix - radix:37", - _ => ThrowAny(() => \"@@"(ignore, toStringWithRadix(0, ~radix=37))), - ), - ( - "toStringWithRadix - radix:1", - _ => ThrowAny(() => \"@@"(ignore, toStringWithRadix(0, ~radix=1))), - ), - ( - "toStringWithRadix - radix:-1", - _ => ThrowAny(() => \"@@"(ignore, toStringWithRadix(0, ~radix=-1))), - ), + ("toStringWithRadix - radix:37", _ => ThrowAny(() => ignore(toStringWithRadix(0, ~radix=37)))), + ("toStringWithRadix - radix:1", _ => ThrowAny(() => ignore(toStringWithRadix(0, ~radix=1)))), + ("toStringWithRadix - radix:-1", _ => ThrowAny(() => ignore(toStringWithRadix(0, ~radix=-1)))), } } diff --git a/tests/tests/src/js_json_test.res b/tests/tests/src/js_json_test.res index 15558f9aeb..a3478fbca7 100644 --- a/tests/tests/src/js_json_test.res +++ b/tests/tests/src/js_json_test.res @@ -127,14 +127,14 @@ let () = { switch ty { | J.JSONObject(x) => /* Test field 'a' */ - let ta = J.classify(\"@@"(option_get, Js_dict.get(x, "a"))) + let ta = J.classify(option_get(Js_dict.get(x, "a"))) switch ta { | J.JSONString(a) => if a != "test string" { false_(__LOC__) } else { /* Test field 'b' */ - let ty = J.classify(\"@@"(option_get, Js_dict.get(x, "b"))) + let ty = J.classify(option_get(Js_dict.get(x, "b"))) switch ty { | J.JSONNumber(b) => add_test(__LOC__, _ => Mt.Approx(123.0, b)) | _ => false_(__LOC__) @@ -261,7 +261,7 @@ let () = { let ty = J.classify(x[1]) switch ty { | J.JSONObject(a1) => - let ty = \"@@"(J.classify, \"@@"(option_get, Js_dict.get(a1, "a"))) + let ty = J.classify(option_get(Js_dict.get(a1, "a"))) switch ty { | J.JSONString(aValue) => eq(__LOC__, aValue, "bbb") | _ => false_(__LOC__) @@ -301,7 +301,7 @@ let () = { eq(__LOC__, J.decodeString(J.boolean(true)), None) eq(__LOC__, J.decodeString(J.array([])), None) eq(__LOC__, J.decodeString(J.null), None) - eq(__LOC__, J.decodeString(\"@@"(J.object_, Js.Dict.empty())), None) + eq(__LOC__, J.decodeString(J.object_(Js.Dict.empty())), None) eq(__LOC__, J.decodeString(J.number(1.23)), None) } @@ -310,7 +310,7 @@ let () = { eq(__LOC__, J.decodeNumber(J.boolean(true)), None) eq(__LOC__, J.decodeNumber(J.array([])), None) eq(__LOC__, J.decodeNumber(J.null), None) - eq(__LOC__, J.decodeNumber(\"@@"(J.object_, Js.Dict.empty())), None) + eq(__LOC__, J.decodeNumber(J.object_(Js.Dict.empty())), None) eq(__LOC__, J.decodeNumber(J.number(1.23)), Some(1.23)) } @@ -319,7 +319,7 @@ let () = { eq(__LOC__, J.decodeObject(J.boolean(true)), None) eq(__LOC__, J.decodeObject(J.array([])), None) eq(__LOC__, J.decodeObject(J.null), None) - eq(__LOC__, J.decodeObject(\"@@"(J.object_, Js.Dict.empty())), Some(Js.Dict.empty())) + eq(__LOC__, J.decodeObject(J.object_(Js.Dict.empty())), Some(Js.Dict.empty())) eq(__LOC__, J.decodeObject(J.number(1.23)), None) } @@ -328,7 +328,7 @@ let () = { eq(__LOC__, J.decodeArray(J.boolean(true)), None) eq(__LOC__, J.decodeArray(J.array([])), Some([])) eq(__LOC__, J.decodeArray(J.null), None) - eq(__LOC__, J.decodeArray(\"@@"(J.object_, Js.Dict.empty())), None) + eq(__LOC__, J.decodeArray(J.object_(Js.Dict.empty())), None) eq(__LOC__, J.decodeArray(J.number(1.23)), None) } @@ -337,7 +337,7 @@ let () = { eq(__LOC__, J.decodeBoolean(J.boolean(true)), Some(true)) eq(__LOC__, J.decodeBoolean(J.array([])), None) eq(__LOC__, J.decodeBoolean(J.null), None) - eq(__LOC__, J.decodeBoolean(\"@@"(J.object_, Js.Dict.empty())), None) + eq(__LOC__, J.decodeBoolean(J.object_(Js.Dict.empty())), None) eq(__LOC__, J.decodeBoolean(J.number(1.23)), None) } @@ -346,7 +346,7 @@ let () = { eq(__LOC__, J.decodeNull(J.boolean(true)), None) eq(__LOC__, J.decodeNull(J.array([])), None) eq(__LOC__, J.decodeNull(J.null), Some(Js.null)) - eq(__LOC__, J.decodeNull(\"@@"(J.object_, Js.Dict.empty())), None) + eq(__LOC__, J.decodeNull(J.object_(Js.Dict.empty())), None) eq(__LOC__, J.decodeNull(J.number(1.23)), None) } diff --git a/tests/tests/src/lazy_test.mjs b/tests/tests/src/lazy_test.mjs index 81b84408b5..3a783ea645 100644 --- a/tests/tests/src/lazy_test.mjs +++ b/tests/tests/src/lazy_test.mjs @@ -163,7 +163,7 @@ Mt.from_pair_suites("Lazy_test", { ], tl: { hd: [ - "File \"lazy_test.res\", line 98, characters 7-14", + "File \"lazy_test.res\", line 95, characters 7-14", () => ({ TAG: "Ok", _0: Lazy.is_val(Lazy.from_val(3)) @@ -171,7 +171,7 @@ Mt.from_pair_suites("Lazy_test", { ], tl: { hd: [ - "File \"lazy_test.res\", line 99, characters 7-14", + "File \"lazy_test.res\", line 96, characters 7-14", () => ({ TAG: "Ok", _0: !Lazy.is_val(Lazy.from_fun(() => { diff --git a/tests/tests/src/lazy_test.res b/tests/tests/src/lazy_test.res index 9129a1745a..d6c0f23079 100644 --- a/tests/tests/src/lazy_test.res +++ b/tests/tests/src/lazy_test.res @@ -78,16 +78,13 @@ Mt.from_pair_suites( ("lazy_force", _ => Eq(u_v.contents, 2)), ("lazy_from_fun", _ => Eq(Lazy.force(l_from_fun), 3)), ("lazy_from_val", _ => Eq(Lazy.force(Lazy.from_val(3)), 3)), - ( - "lazy_from_val2", - _ => Eq(\"@@"(Lazy.force, Lazy.force(Lazy.from_val(Lazy.from_fun(() => 3)))), 3), - ), + ("lazy_from_val2", _ => Eq(Lazy.force(Lazy.force(Lazy.from_val(Lazy.from_fun(() => 3)))), 3)), ( "lazy_from_val3", _ => Eq( { %debugger - \"@@"(Lazy.force, Lazy.force(Lazy.from_val(forward_test))) + Lazy.force(Lazy.force(Lazy.from_val(forward_test))) }, 4, ), @@ -96,7 +93,7 @@ Mt.from_pair_suites( (__FILE__, _ => Eq(a7, None)), (__FILE__, _ => Eq(a8, ())), (__LOC__, _ => Ok(Lazy.is_val(Lazy.from_val(3)))), - (__LOC__, _ => Ok(\"@@"(not, Lazy.is_val(Lazy.from_fun(() => raise(Not_found)))))), + (__LOC__, _ => Ok(!Lazy.is_val(Lazy.from_fun(() => raise(Not_found))))), } }, ) diff --git a/tests/tests/src/lib_js_test.res b/tests/tests/src/lib_js_test.res index c5f2cec14a..f237d65dbc 100644 --- a/tests/tests/src/lib_js_test.res +++ b/tests/tests/src/lib_js_test.res @@ -1,7 +1,7 @@ @val external to_json_string: 'a => string = "JSON.stringify" let () = { - \"@@"(Js.log, to_json_string(list{1, 2, 3})) + Js.log(to_json_string(list{1, 2, 3})) Js.log("hey") } @val external of_any: 'a => string = "String" diff --git a/tests/tests/src/map_find_test.res b/tests/tests/src/map_find_test.res index 0f5c367623..e4c3c828d7 100644 --- a/tests/tests/src/map_find_test.res +++ b/tests/tests/src/map_find_test.res @@ -19,12 +19,9 @@ include ( ) => acc->SMap.set(k, v)) @val("console.log") external log: 'a => unit = "" - \"@@"( - Mt.from_pair_suites(__MODULE__, ...), - list{ - ("int", _ => Eq(IntMap.get(m, 10), Some('a'))), - ("string", _ => Eq(SMap.get(s, "10"), Some('a'))), - } - ) + (Mt.from_pair_suites(__MODULE__, ...))(list{ + ("int", _ => Eq(IntMap.get(m, 10), Some('a'))), + ("string", _ => Eq(SMap.get(s, "10"), Some('a'))), + }) }: {} ) diff --git a/tests/tests/src/mario_game.res b/tests/tests/src/mario_game.res index 28916eb705..acc91af352 100644 --- a/tests/tests/src/mario_game.res +++ b/tests/tests/src/mario_game.res @@ -1455,7 +1455,7 @@ module Draw: { let context = Dom_html.canvasRenderingContext2DToJsObj(canvas["getContext"]("2d")) let cwidth = float_of_int(canvas["width"]) let cheight = float_of_int(canvas["height"]) - \"@@"(ignore, context["clearRect"](0., 0., cwidth, cheight)) + ignore(context["clearRect"](0., 0., cwidth, cheight)) } /* Displays the text for score and coins. */ @@ -1464,12 +1464,11 @@ module Draw: { let coin_string = Js.Int.toString(coins) let canvas = Dom_html.canvasElementToJsObj(canvas) let context = Dom_html.canvasRenderingContext2DToJsObj(canvas["getContext"]("2d")) - \"@@"(ignore, context["font"] = "10px 'Press Start 2P'") - \"@@"( - ignore, + ignore(context["font"] = "10px 'Press Start 2P'") + ignore( context["fillText"]("Score: " ++ score_string, float_of_int(canvas["width"]) -. 140., 18.), ) - \"@@"(ignore, context["fillText"]("Coins: " ++ coin_string, 120., 18.)) + ignore(context["fillText"]("Coins: " ++ coin_string, 120., 18.)) } /* Displays the fps. */ @@ -1477,7 +1476,7 @@ module Draw: { let fps_str = fps_val->Js.Float.toFixed let canvas = Dom_html.canvasElementToJsObj(canvas) let context = Dom_html.canvasRenderingContext2DToJsObj(canvas["getContext"]("2d")) - \"@@"(ignore, context["fillText"](fps_str, 10., 18.)) + ignore(context["fillText"](fps_str, 10., 18.)) } /* game_win displays a black screen when you finish a game. */ @@ -2104,8 +2103,7 @@ module Director: { parts->List.forEach(part => run_update_particle(state, part)) Draw.fps(canvas, fps) Draw.hud(canvas, state.score, state.coins) - \"@@"( - ignore, + ignore( Dom_html.requestAnimationFrame((t: float) => update_helper(t, state, player, collid_objs.contents, particles.contents) ), diff --git a/tests/tests/src/option_repr_test.mjs b/tests/tests/src/option_repr_test.mjs index 84b3ae1fe9..4022fd2cbe 100644 --- a/tests/tests/src/option_repr_test.mjs +++ b/tests/tests/src/option_repr_test.mjs @@ -175,7 +175,7 @@ let xs = { tl: /* [] */0 }; -b("File \"option_repr_test.res\", line 125, characters 8-15", Belt_List.every(xs, x => x)); +b("File \"option_repr_test.res\", line 125, characters 3-10", Belt_List.every(xs, x => x)); let xs_0$1 = Primitive_object.lessthan(Primitive_option.some(undefined), 3) && Primitive_object.greaterthan(3, Primitive_option.some(undefined)); @@ -216,7 +216,7 @@ let xs$1 = { tl: xs_1 }; -b("File \"option_repr_test.res\", line 128, characters 4-11", Belt_List.every(xs$1, x => x)); +b("File \"option_repr_test.res\", line 127, characters 3-10", Belt_List.every(xs$1, x => x)); let xs_0$2 = true && true; @@ -239,7 +239,7 @@ let xs$2 = { tl: xs_1$1 }; -b("File \"option_repr_test.res\", line 145, characters 4-11", Belt_List.every(xs$2, x => x)); +b("File \"option_repr_test.res\", line 143, characters 3-10", Belt_List.every(xs$2, x => x)); function v(x) { return x; diff --git a/tests/tests/src/option_repr_test.res b/tests/tests/src/option_repr_test.res index fe90e64f60..2d2b9884f6 100644 --- a/tests/tests/src/option_repr_test.res +++ b/tests/tests/src/option_repr_test.res @@ -122,10 +122,9 @@ let neqx = (a, b) => a != b && b != a let all_true = xs => Belt.List.every(xs, x => x) -\"@@"(b(__LOC__, ...), all_true(list{gtx(Some(Some(Js.null)), Some(None))})) +(b(__LOC__, ...))(all_true(list{gtx(Some(Some(Js.null)), Some(None))})) -\"@@"( - b(__LOC__, ...), +(b(__LOC__, ...))( all_true(list{ ltx(Some(None), Some(Some(3))), ltx(Some(None), Some(Some(None))), @@ -138,18 +137,17 @@ let all_true = xs => Belt.List.every(xs, x => x) ltx(None, Some(Js.null)), ltx(None, Some(x => x)), ltx(Some(Js.null), Some(Js.Null.return(3))), - }) + }), ) -\"@@"( - b(__LOC__, ...), +(b(__LOC__, ...))( all_true(list{ eqx(None, None), neqx(None, Some(Js.null)), eqx(Some(None), Some(None)), eqx(Some(Some(None)), Some(Some(None))), neqx(Some(Some(Some(None))), Some(Some(None))), - }) + }), ) module N0 = { diff --git a/tests/tests/src/rec_fun_test.res b/tests/tests/src/rec_fun_test.res index b7b7edf5d4..568e8986ce 100644 --- a/tests/tests/src/rec_fun_test.res +++ b/tests/tests/src/rec_fun_test.res @@ -21,7 +21,7 @@ let g = () => { i + 1 } - Js.log(\"@@"(Js.Int.toString, next(0, true))) + Js.log(Js.Int.toString(next(0, true))) } g() diff --git a/tests/tests/src/regression_print.res b/tests/tests/src/regression_print.res index 76abbb043c..4ff4f38a4d 100644 --- a/tests/tests/src/regression_print.res +++ b/tests/tests/src/regression_print.res @@ -4,7 +4,7 @@ include ( let debug = x => Js.log(to_str(x)) let () = { - \"@@"(debug, 2) + debug(2) debug(1) } }: {} diff --git a/tests/tests/src/test_demo.res b/tests/tests/src/test_demo.res index 17e9930d5d..4e728172a2 100644 --- a/tests/tests/src/test_demo.res +++ b/tests/tests/src/test_demo.res @@ -76,8 +76,7 @@ let f = (x: cxt) => { } let f = (g, x: cxt) => - \"@@"( - g, + g( switch x { | A => 0 | B(_) => 1 @@ -89,8 +88,7 @@ let f = (g, x: cxt) => ) let f = (h, g, x) => - \"@@"( - h, + h( try g(x) catch { | Not_found => 0 }, diff --git a/tests/tests/src/test_string_map.res b/tests/tests/src/test_string_map.res index 7bc1a0cb29..187118750d 100644 --- a/tests/tests/src/test_string_map.res +++ b/tests/tests/src/test_string_map.res @@ -13,12 +13,12 @@ include ( let assertion_test = () => { let m = ref(StringMap.empty) let count = 1000000 - \"@@"(timing("building", ...), _ => + (timing("building", ...))(_ => for i in 0 to count { m := m.contents->StringMap.set(Js.Int.toString(i), Js.Int.toString(i)) } ) - \"@@"(timing("querying", ...), _ => + (timing("querying", ...))(_ => for i in 0 to count { m.contents->StringMap.get(Js.Int.toString(i))->ignore } diff --git a/tests/tests/src/test_type_based_arity.res b/tests/tests/src/test_type_based_arity.res index ff4dc45e8a..4b20ddb8c5 100644 --- a/tests/tests/src/test_type_based_arity.res +++ b/tests/tests/src/test_type_based_arity.res @@ -17,7 +17,7 @@ module X: { let f2 = (g, x): X.t => g(x) -let f3 = (g, x) => \"@@"(ignore, g(x)) +let f3 = (g, x) => ignore(g(x)) let f4 = (g, x): ('a, 'b) => g(x) diff --git a/tests/tests/src/test_unsafe_obj_ffi_ppx.res b/tests/tests/src/test_unsafe_obj_ffi_ppx.res index b9053cf5b9..b3d43839ab 100644 --- a/tests/tests/src/test_unsafe_obj_ffi_ppx.res +++ b/tests/tests/src/test_unsafe_obj_ffi_ppx.res @@ -3,7 +3,7 @@ let i = () => () let h = (x): unit => { x["height"] = 3 - \"@@"(i, x["width"] = 3) + i(x["width"] = 3) } let chain = x => x["element"]["length"] + x["element"]["length"] diff --git a/tests/tests/src/test_zero_nullable.res b/tests/tests/src/test_zero_nullable.res index 8bf0ceeb48..fbc3c6ab1d 100644 --- a/tests/tests/src/test_zero_nullable.res +++ b/tests/tests/src/test_zero_nullable.res @@ -33,7 +33,7 @@ module Test_null = { } let f5 = (h, x) => { - let u = \"@@"(Js.Null.toOption, h(32)) + let u = Js.Null.toOption(h(32)) switch u { | None => let sum = (x, y) => x + y @@ -45,7 +45,7 @@ module Test_null = { } let f4 = (h, x) => { - let u = \"@@"(Js.Null.toOption, h(32)) + let u = Js.Null.toOption(h(32)) let v = 32 + x switch u { | None => @@ -111,7 +111,7 @@ module Test_def = { } let f5 = (h, x) => { - let u = \"@@"(Js.Undefined.toOption, h(32)) + let u = Js.Undefined.toOption(h(32)) switch u { | None => let sum = (x, y) => x + y @@ -123,7 +123,7 @@ module Test_def = { } let f4 = (h, x) => { - let u = \"@@"(Js.Undefined.toOption, h(32)) + let u = Js.Undefined.toOption(h(32)) let v = 32 + x switch u { | None => @@ -189,7 +189,7 @@ module Test_null_def = { } let f5 = (h, x) => { - let u = \"@@"(toOption, h(32)) + let u = toOption(h(32)) switch u { | None => let sum = (x, y) => x + y @@ -201,7 +201,7 @@ module Test_null_def = { } let f4 = (h, x) => { - let u = \"@@"(toOption, h(32)) + let u = toOption(h(32)) let v = 32 + x switch u { | None => @@ -240,7 +240,7 @@ module Test_null_def = { let f10 = x => isNullable(x) - let f11 = \"@@"(isNullable, return(3)) + let f11 = isNullable(return(3)) } let () = { diff --git a/tests/tests/src/unsafe_ppx_test.res b/tests/tests/src/unsafe_ppx_test.res index ffaf533d30..7c38200e66 100644 --- a/tests/tests/src/unsafe_ppx_test.res +++ b/tests/tests/src/unsafe_ppx_test.res @@ -20,10 +20,10 @@ let g = a => { }`) let regression2: (float, float) => float = %raw("Math.max") - \"@@"(ignore, regression(a, failwith)) - \"@@"(ignore, regression2(3., 2.)) - \"@@"(ignore, regression3(3., 2.)) - \"@@"(ignore, regression4(3., x => x)) + ignore(regression(a, failwith)) + ignore(regression2(3., 2.)) + ignore(regression3(3., 2.)) + ignore(regression4(3., x => x)) } let max2: (float, float) => float = %raw("Math.max")