// Generated by ReScript, PLEASE EDIT WITH CARE import * as Mocha from "mocha"; import * as Test_utils from "./test_utils.mjs"; function f0(x) { return x + 1 | 0; } function f1(x) { return (x + 1 | 0) + 1 | 0; } function f2(x) { return ((x + 1 | 0) + 1 | 0) + 2 | 0; } function f3(x) { return (((x + 1 | 0) + 1 | 0) + 2 | 0) + 3 | 0; } function f4(x) { return ((((x + 1 | 0) + 1 | 0) + 2 | 0) + 3 | 0) + 4 | 0; } function f5(x) { return (((((x + 1 | 0) + 1 | 0) + 2 | 0) + 3 | 0) + 4 | 0) + 5 | 0; } function f6(x) { return ((((f1(x) + 2 | 0) + 3 | 0) + 4 | 0) + 5 | 0) + 6 | 0; } function g0(x) { return (x << 1); } function g1(x) { return ((x << 1) << 1); } function g2(x) { return (((x << 1) << 1) << 1); } function g3(x) { return ((((x << 1) << 1) << 1) << 1); } function g4(x) { return ((((x << 1) << 1) << 1) << 1) + 1 | 0; } let zero = { contents: 0 }; Mocha.describe("Inline_chain_test", () => { Mocha.test("chain of small functions", () => { Test_utils.eq("File \"inline_chain_test.res\", line 28, characters 7-14", (((f2(zero.contents) + 3 | 0) + 4 | 0) + 5 | 0) + 6 | 0, 22); Test_utils.eq("File \"inline_chain_test.res\", line 29, characters 7-14", ((((zero.contents + 1 | 0) + 1 | 0) + 1 | 0) + 2 | 0) + 3 | 0, 8); }); Mocha.test("chain of @inline functions", () => Test_utils.eq("File \"inline_chain_test.res\", line 32, characters 7-14", (((((zero.contents + 1 | 0) << 1) << 1) << 1) << 1) + 1 | 0, 17)); }); export { f0, f1, f2, f3, f4, f5, f6, g0, g1, g2, g3, g4, zero, } /* Not a pure module */