aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-06 20:48:24 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:50 +0200
commit4244ce1d2933c11229a2468d4f41c58b73ed649c (patch)
tree3feb52338cbf93ef4171c3f471085b7907d61071 /tests/test_core.py
parent72cbc30fb0898ec61fea669b97c9a31860df81a9 (diff)
Use do_run_from_file() for test_i32_mul_precise
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 03a95551..351745e2 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -427,18 +427,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_i32_mul_precise(self):
if self.emcc_args == None: return self.skip('needs ta2')
- src = r'''
- #include <stdio.h>
+ test_path = path_from_root('tests', 'core', 'test_i32_mul_precise')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main(int argc, char **argv) {
- unsigned long d1 = 0x847c9b5d;
- unsigned long q = 0x549530e1;
- if (argc > 1000) { q += argc; d1 -= argc; } // confuse optimizer
- printf("%lu\n", d1*q);
- return 0;
- }
- '''
- self.do_run(src, '3217489085')
+ self.do_run_from_file(src, output)
def test_i32_mul_semiprecise(self):
if Settings.ASM_JS: return self.skip('asm is always fully precise')