diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index c065a993..0b3d4ea5 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1848,23 +1848,12 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co assert process.returncode is 0, 'float.h should agree with our system' def test_llvm_used(self): - src = r''' - #include <stdio.h> - #include <emscripten.h> - - extern "C" { - EMSCRIPTEN_KEEPALIVE void foobar(int x) { - printf("Worked! %d\n", x); - } - } - - int main() { - emscripten_run_script("Module['_foobar'](10)"); - return 0; - }''' - Building.LLVM_OPTS = 3 - self.do_run(src, 'Worked! 10\n') + + test_path = path_from_root('tests', 'core', 'test_llvm_used') + src, output = (test_path + s for s in ('.in', '.out')) + + self.do_run_from_file(src, output) def test_emscripten_api(self): #if Settings.MICRO_OPTS or Settings.RELOOP or Building.LLVM_OPTS: return self.skip('FIXME') |