diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-06 21:51:28 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:51 +0200 |
commit | 4274fd95d0e33d436fd6d16419b6aab34cae3ed4 (patch) | |
tree | a0771f24f8eddd80abe1c8c53dfad48e4448b7cb /tests/test_core.py | |
parent | 535b51e4e6f1f6c4fac05828ecde8f4444a01c51 (diff) |
Use do_run_from_file() for test_fast_math
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 2a056cf2..1e131563 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -770,21 +770,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co if self.emcc_args is None: return self.skip('requires emcc') Building.COMPILER_TEST_OPTS += ['-ffast-math'] - self.do_run(r''' -#include <stdio.h> -#include <stdlib.h> + test_path = path_from_root('tests', 'core', 'test_fast_math') + src, output = (test_path + s for s in ('.in', '.out')) -int main(int argc, char** argv) { - char* endptr; - --argc, ++argv; - double total = 0.0; - for (; argc; argc--, argv++) { - total += strtod(*argv, &endptr); - } - printf("total: %g\n", total); - return 0; -} -''', 'total: 19', ['5', '6', '8']) + self.do_run_from_file(src, output, ['5', '6', '8']) def test_zerodiv(self): self.do_run(r''' |