Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/test/embind/test_i64_binding.js
4150 views
1
addToLibrary({
2
ensure_js_throws_with_assertions_enabled__deps: ['$bigintToI53Checked'],
3
ensure_js_throws_with_assertions_enabled: function(js_code, error_type) {
4
js_code = UTF8ToString(bigintToI53Checked(js_code));
5
error_type = UTF8ToString(bigintToI53Checked(error_type));
6
js_code += ";";
7
try {
8
eval(js_code);
9
} catch(error_thrown) {
10
#if ASSERTIONS
11
assert(error_thrown.name === error_type);
12
#else
13
assert(false);
14
#endif
15
return;
16
}
17
#if ASSERTIONS
18
assert(false);
19
#endif
20
}
21
});
22
23