aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-07 14:05:53 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-07 14:05:53 -0800
commite4e8063f6d568277b297f19d51801cd7dda9545c (patch)
tree5ba387db6820ab167568f6bd1d5ff84ab9dab9a9 /tests
parent582e3e62db1bf888f6c60881694c05cf37a3b55f (diff)
handle variables that assign a value including themselves in aggressiveVariableElimination
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 6442f894..1dc25dce 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4652,12 +4652,15 @@ return malloc(size);
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
- self.do_run('',
- 'hello lua world!\n17\n1\n2\n3\n4\n7',
- args=['-e', '''print("hello lua world!");print(17);for x = 1,4 do print(x) end;print(10-3)'''],
- libraries=self.get_library('lua', [os.path.join('src', 'lua'), os.path.join('src', 'liblua.a')], make=['make', 'generic'], configure=None),
- includes=[path_from_root('tests', 'lua')],
- output_nicerizer=lambda string, err: (string + err).replace('\n\n', '\n').replace('\n\n', '\n'))
+ for aggro in ([0, 1] if '-O2' in self.emcc_args else [0]):
+ print aggro
+ Settings.AGGRESSIVE_VARIABLE_ELIMINATION = aggro
+ self.do_run('',
+ 'hello lua world!\n17\n1\n2\n3\n4\n7',
+ args=['-e', '''print("hello lua world!");print(17);for x = 1,4 do print(x) end;print(10-3)'''],
+ libraries=self.get_library('lua', [os.path.join('src', 'lua'), os.path.join('src', 'liblua.a')], make=['make', 'generic'], configure=None),
+ includes=[path_from_root('tests', 'lua')],
+ output_nicerizer=lambda string, err: (string + err).replace('\n\n', '\n').replace('\n\n', '\n'))
def get_freetype(self):
Settings.DEAD_FUNCTIONS += ['_inflateEnd', '_inflate', '_inflateReset', '_inflateInit2_']