diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 13:06:16 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:56 +0200 |
commit | 1de317c109dbdcfe403eef51708b41374697fed7 (patch) | |
tree | 0d1a624317b926f97c0cfeb1f0824945002f56fb /tests/test_core.py | |
parent | 6727994eb193435c0f3c16b701d58f23c5f0e86d (diff) |
Use do_run_from_file() for test_tinyfuncstr
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index adbe1826..25daae15 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1999,20 +1999,11 @@ def process(filename): def test_tinyfuncstr(self): if self.emcc_args is None: return self.skip('requires emcc') - src = ''' - #include <stdio.h> - struct Class { - static char *name1() { return "nameA"; } - char *name2() { return "nameB"; } - }; + test_path = path_from_root('tests', 'core', 'test_tinyfuncstr') + src, output = (test_path + s for s in ('.in', '.out')) - int main() { - printf("*%s,%s*\\n", Class::name1(), (new Class())->name2()); - return 0; - } - ''' - self.do_run(src, '*nameA,nameB*') + self.do_run_from_file(src, output) def test_llvmswitch(self): Settings.CORRECT_SIGNS = 1 |