Skip to content

Commit 61185c6

Browse files
committed
Add a test
1 parent daa98e0 commit 61185c6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/test_other.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16060,3 +16060,24 @@ def test_getentropy_d8(self):
1606016060
self.do_runf('main.c', msg, assert_returncode=1)
1606116061
self.v8_args += ['--enable-os-system']
1606216062
self.do_runf('main.c')
16063+
16064+
def test_js_bool_type(self):
16065+
create_file('main.c', '''
16066+
#include <emscripten.h>
16067+
16068+
#define EM_JS_MACROS(ret, func_name, args, body...) \
16069+
EM_JS(ret, func_name, args, body)
16070+
16071+
EM_JS_MACROS(void, check_bool_type, (void), {
16072+
if (typeof true !== "boolean") {
16073+
throw new Error("typeof true is " + typeof true + " not boolean");
16074+
}
16075+
})
16076+
16077+
int main() {
16078+
check_bool_type();
16079+
return 0;
16080+
}
16081+
''')
16082+
self.do_runf('main.c')
16083+

0 commit comments

Comments
 (0)