aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-06 10:54:10 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-06 11:05:05 -0700
commit0ff7f8dcd655e84eb7c750cff927b11231b61589 (patch)
tree0e5835cec2acaa4ce0bf7c760c36158350dd55bc /tests/test_core.py
parente9624929302ad7f10d38a8de21dd0d7f5aa1f675 (diff)
fix inline js in x86 target, enable testing sans validation for inline js in asm.js, fix unistd tests that use inline js to not validate, and make js optimizer more tolerant of inline js in asm code; fixes #1597
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 2238859b..3568efee 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -3742,7 +3742,7 @@ def process(filename):
self.do_run(open(path_from_root('tests', 'emscripten_get_now.cpp')).read(), 'Timer resolution is good.')
def test_inlinejs(self):
- if Settings.ASM_JS: return self.skip('asm does not support random code, TODO: something that works in asm')
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = r'''
#include <stdio.h>
@@ -3762,7 +3762,7 @@ def process(filename):
self.do_run(src, 'Inline JS is very cool\n3.64\n')
def test_inlinejs2(self):
- if Settings.ASM_JS: return self.skip('asm does not support random code, TODO: something that works in asm')
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = r'''
#include <stdio.h>
@@ -7613,11 +7613,13 @@ def process(filename):
Settings.INCLUDE_FULL_LIBRARY = 0
def test_unistd_access(self):
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = open(path_from_root('tests', 'unistd', 'access.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'access.out'), 'r').read()
self.do_run(src, expected)
def test_unistd_curdir(self):
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = open(path_from_root('tests', 'unistd', 'curdir.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'curdir.out'), 'r').read()
self.do_run(src, expected)
@@ -7647,6 +7649,7 @@ def process(filename):
self.do_run(src, expected)
def test_unistd_truncate(self):
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = open(path_from_root('tests', 'unistd', 'truncate.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'truncate.out'), 'r').read()
self.do_run(src, expected)
@@ -7675,6 +7678,7 @@ def process(filename):
self.do_run(src, 'success', force_c=True)
def test_unistd_links(self):
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = open(path_from_root('tests', 'unistd', 'links.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'links.out'), 'r').read()
self.do_run(src, expected)
@@ -7685,6 +7689,7 @@ def process(filename):
self.do_run(src, expected)
def test_unistd_io(self):
+ if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code
src = open(path_from_root('tests', 'unistd', 'io.c'), 'r').read()
expected = open(path_from_root('tests', 'unistd', 'io.out'), 'r').read()
self.do_run(src, expected)