diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-20 17:21:40 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-20 17:21:40 -0800 |
commit | 9d10b207a5145e6427b7c774945dd3aa25577f76 (patch) | |
tree | e94739b5b216eef05a2650a72cd17ba8c83e116b | |
parent | 8db7402c6c2e7b15fe73ae54f271be0b4e4f4373 (diff) |
enable and fix more tests for fastcomp
-rw-r--r-- | tests/test_core.py | 6 | ||||
-rw-r--r-- | tests/utf32.cpp | 20 |
2 files changed, 10 insertions, 16 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 381d1a7e..8c4d47a8 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1281,7 +1281,6 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co self.do_run_from_file(src, output) - def test_exceptions_white_list(self): if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp') @@ -1346,13 +1345,9 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co self.do_run_from_file(src, output) def test_exceptions_multi(self): - if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp') - Settings.DISABLE_EXCEPTION_CATCHING = 0 - test_path = path_from_root('tests', 'core', 'test_exceptions_multi') src, output = (test_path + s for s in ('.in', '.out')) - self.do_run_from_file(src, output) def test_exceptions_std(self): @@ -4077,7 +4072,6 @@ def process(filename): def test_utf32(self): if self.emcc_args is None: return self.skip('need libc for wcslen()') if not self.is_le32(): return self.skip('this test uses inline js, which requires le32') - if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp') self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.') self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.', args=['-fshort-wchar']) diff --git a/tests/utf32.cpp b/tests/utf32.cpp index 6b75b244..d00338a6 100644 --- a/tests/utf32.cpp +++ b/tests/utf32.cpp @@ -16,11 +16,11 @@ int main() { if (sizeof(wchar_t) == 4) { utf32 *memory = new utf32[wstr.length()+1]; - asm("var str = Module.UTF32ToString(%0);" - "Module.print(str);" - "Module.stringToUTF32(str, %1);" - : - : "r"(wstr.c_str()), "r"(memory)); + EM_ASM_INT({ + var str = Module.UTF32ToString($0); + Module.print(str); + Module.stringToUTF32(str, $1); + }, wstr.c_str(), memory); // Compare memory to confirm that the string is intact after taking a route through JS side. const utf32 *srcPtr = reinterpret_cast<const utf32 *>(wstr.c_str()); @@ -33,11 +33,11 @@ int main() { } else { // sizeof(wchar_t) == 2, and we're building with -fshort-wchar. utf16 *memory = new utf16[2*wstr.length()+1]; - asm("var str = Module.UTF16ToString(%0);" - "Module.print(str);" - "Module.stringToUTF16(str, %1);" - : - : "r"(wstr.c_str()), "r"(memory)); + EM_ASM_INT({ + var str = Module.UTF16ToString($0); + Module.print(str); + Module.stringToUTF16(str, $1); + }, wstr.c_str(), memory); // Compare memory to confirm that the string is intact after taking a route through JS side. const utf16 *srcPtr = reinterpret_cast<const utf16 *>(wstr.c_str()); |