diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 11:58:02 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:55 +0200 |
commit | 74502e3598b09e6663ece351c0bc2c0aafd68338 (patch) | |
tree | 2bff38c328a6a42b086d0ce036c44822cf0e8e29 | |
parent | 1985354735e25d1d61a895811a379fa2b1213ae9 (diff) |
Use do_run_from_file() for test_emptyclass
-rw-r--r-- | tests/core/test_emptyclass.in | 15 | ||||
-rw-r--r-- | tests/core/test_emptyclass.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 17 |
3 files changed, 19 insertions, 14 deletions
diff --git a/tests/core/test_emptyclass.in b/tests/core/test_emptyclass.in new file mode 100644 index 00000000..24a550db --- /dev/null +++ b/tests/core/test_emptyclass.in @@ -0,0 +1,15 @@ + + #include <stdio.h> + + struct Randomized { + Randomized(int x) { + printf("*zzcheezzz*\n"); + } + }; + + int main( int argc, const char *argv[] ) { + new Randomized(55); + + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_emptyclass.out b/tests/core/test_emptyclass.out new file mode 100644 index 00000000..1be15e15 --- /dev/null +++ b/tests/core/test_emptyclass.out @@ -0,0 +1 @@ +*zzcheezzz*
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index 911c7a68..b72ae793 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1545,22 +1545,11 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co def test_emptyclass(self): if self.emcc_args is None: return self.skip('requires emcc') - src = ''' - #include <stdio.h> - - struct Randomized { - Randomized(int x) { - printf("*zzcheezzz*\\n"); - } - }; - int main( int argc, const char *argv[] ) { - new Randomized(55); + test_path = path_from_root('tests', 'core', 'test_emptyclass') + src, output = (test_path + s for s in ('.in', '.out')) - return 0; - } - ''' - self.do_run(src, '*zzcheezzz*') + self.do_run_from_file(src, output) def test_alloca(self): src = ''' |