Skip to content

Commit

Permalink
add a test for 64-bit inputs to EM_ASM (emscripten-core#4708)
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken authored Nov 11, 2016
1 parent be92a62 commit af59ea2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -6425,6 +6425,20 @@ def test_memory_growth_noasm(self):
src = open('a.out.js').read()
assert 'use asm' not in src

def test_EM_ASM_i64(self):
open('src.cpp', 'w').write('''
#include <stdint.h>
#include <emscripten.h>
int main() {
EM_ASM_ARGS({
Module.print('inputs: ' + $0 + ', ' + $1 + '.');
}, int64_t(0x12345678ABCDEF1FLL));
}
''')
out, err = Popen([PYTHON, EMCC, 'src.cpp', '-Oz'], stderr=PIPE).communicate()
self.assertContained('LLVM ERROR: EM_ASM should not receive i64s as inputs, they are not valid in JS', err)

def test_eval_ctors(self):
print 'non-terminating ctor'
src = r'''
Expand Down

0 comments on commit af59ea2

Please sign in to comment.