// Generated by ReScript, PLEASE EDIT WITH CARE import * as Mocha from "mocha"; import * as Test_string_switch from "./test_string_switch.mjs"; Mocha.describe("String_switch_test", () => { Mocha.test("equivalent string escape spellings in switch cases", () => { if (Test_string_switch.classifyEquivalentEscape("a", 0) !== 0) { throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 5, 4 ], Error: new Error() }; } if (Test_string_switch.classifyEquivalentEscape("a", 1) !== 1) { throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 6, 4 ], Error: new Error() }; } if (Test_string_switch.classifyEquivalentEscape("a", 2) !== 2) { throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 7, 4 ], Error: new Error() }; } if (Test_string_switch.classifyEquivalentEscape("a", 3) !== 3) { throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 8, 4 ], Error: new Error() }; } if (Test_string_switch.classifyEquivalentEscape("a", 4) === 4) { return; } throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 9, 4 ], Error: new Error() }; }); Mocha.test("equivalent surrogate-pair escape spellings in switch cases", () => { if (Test_string_switch.classifyEquivalentSurrogateEscape("😀", 0) !== 0) { throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 13, 4 ], Error: new Error() }; } if (Test_string_switch.classifyEquivalentSurrogateEscape("😀", 1) !== 1) { throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 14, 4 ], Error: new Error() }; } if (Test_string_switch.classifyEquivalentSurrogateEscape("😀", 2) === 2) { return; } throw { RE_EXN_ID: "Assert_failure", _1: [ "string_switch_test.res", 15, 4 ], Error: new Error() }; }); }); /* Not a pure module */