MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / dostuff

Function dostuff

test/core/test_longjmp_exc.c:15–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13jmp_buf abortframe;
14
15void dostuff(int a) {
16 printf("pre\n");
17 if (a != 42)
18 emscripten_run_script(
19 "waka_waka()"); // this should fail, and never reach "never"
20 printf("never\n");
21
22 if (a == 100) {
23 longjmp(abortframe, -1);
24 }
25
26 if (setjmp(abortframe)) {
27 printf("got 100");
28 }
29}
30
31int main(int argc, char **argv) {
32 dostuff(argc);

Callers 1

mainFunction · 0.85

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected