Skip to content

Commit af6f173

Browse files
committed
add test
1 parent 8ed5164 commit af6f173

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/other/test_em_js_main.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ in main
22
hello from side module 42 + hello
33
hello again
44
hello from void func
5+
indirect ptr value: 0

test/other/test_em_js_side.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ EM_JS(void, js_side_func_void, (), {
1414
out(`hello from void func`);
1515
});
1616

17+
EM_JS(void, js_side_func_indirect_ptr, (char **pptr), {
18+
out(`indirect ptr value: ${pptr}`);
19+
});
20+
1721
int test_side() {
1822
js_side_func(42, "hello");
1923
js_side_func2("hello again");
2024
js_side_func_void();
25+
js_side_func_indirect_ptr(NULL);
2126
return 0;
2227
}

0 commit comments

Comments
 (0)