diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-25 20:41:37 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:03 -0700 |
commit | 5e01920010c51286010e0d59d5b7541aad0678e8 (patch) | |
tree | 47391361dc01e41dfee79fa9d3177f9db39f13db /tests/runner.py | |
parent | b0e85bc8defe0e56c5baf4c1f510572b9f2d5196 (diff) |
fix heap merging, add padding and offset adjustment, basic test passes in reverse as well
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/runner.py b/tests/runner.py index 7a8ccf6f..f875ca3d 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10610,7 +10610,8 @@ f.close() assert not os.path.exists('a.out') and not os.path.exists('a.exe'), 'Must not leave unneeded linker stubs' def test_static_link(self): - def test(main, side, first=True): + def test(name, main, side, expected, first=True): + print name #t = main ; main = side ; side = t open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(main) open(os.path.join(self.get_dir(), 'side.cpp'), 'w').write(side) @@ -10620,20 +10621,20 @@ f.close() Popen([PYTHON, EMLINK, 'main.js', 'side.js', 'together.js'], stdout=PIPE).communicate() assert os.path.exists('together.js') out = run_js('together.js', engine=SPIDERMONKEY_ENGINE, stderr=PIPE, full_output=True) - self.assertContained('side says 11.', out) + self.assertContained(expected, out) self.validate_asmjs(out) - #if first: test(side, main, False) # test reverse order + if first: test(name + ' (reverse)', side, main, expected, False) # test reverse order - test(''' + test('basics', ''' #include <stdio.h> extern int sidey(); int main() { - printf("side says %d.", sidey()); + printf("other says %d.", sidey()); return 0; } ''', ''' int sidey() { return 11; } - ''') + ''', 'other says 11.') def test_symlink(self): if os.name == 'nt': |