aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-02 18:08:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-02 18:08:43 -0800
commite9205ea395def2b430e95671f1f6ea1c3211937a (patch)
tree6cde5d21cbe17dd4a052b4b617347963ef079da3
parentd9b630da89c7bdd30f9489e8e69040e7a007c3ba (diff)
enable postset counting code in fastcomp on asm1.test_cubescript
-rw-r--r--tests/test_core.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 3ce118df..06faf28f 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4642,7 +4642,16 @@ return malloc(size);
self.do_run(path_from_root('tests', 'cubescript'), '*\nTemp is 33\n9\n5\nhello, everyone\n*', main_file='command.cpp')
- if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('skipping extra parts in fastcomp')
+ assert 'asm1' in test_modes
+ if self.run_name == 'asm1':
+ print 'verifing postsets'
+ generated = open('src.cpp.o.js').read()
+ generated = re.sub(r'\n+[ \n]*\n+', '\n', generated)
+ main = generated[generated.find('function runPostSets'):]
+ main = main[:main.find('\n}')]
+ assert main.count('\n') <= 7, ('must not emit too many postSets: %d' % main.count('\n')) + ' : ' + main
+
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('fastcomp always aliases pointers')
assert 'asm2g' in test_modes
if self.run_name == 'asm2g':
@@ -4661,14 +4670,6 @@ return malloc(size);
assert ' & 255]()' not in original, 'big function table does not exist'
assert ' & 255]()' in final, 'big function table exists'
- assert 'asm1' in test_modes
- if self.run_name == 'asm1':
- generated = open('src.cpp.o.js').read()
- generated = re.sub(r'\n+[ \n]*\n+', '\n', generated)
- main = generated[generated.find('function runPostSets'):]
- main = main[:main.find('\n}')]
- assert main.count('\n') == 7, 'must not emit too many postSets: %d' % main.count('\n')
-
def test_simd(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('needs ta2')
if Settings.ASM_JS: Settings.ASM_JS = 2 # does not validate