diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 12:22:07 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:55 +0200 |
commit | e4d05a96412b44b978d3b4f8a126b659738d56bf (patch) | |
tree | a7fc2d75302c474057eb2f027cc024159294320d /tests/test_core.py | |
parent | 155d737f1fa091ca34404f73d7fc315af4439e09 (diff) |
Use do_run_from_file() for test_conststructs
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 12af6d55..f5285db0 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1731,28 +1731,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co self.do_run_from_file(src, output) def test_conststructs(self): - src = ''' - #include <stdio.h> - struct IUB { - int c; - double p; - unsigned int pi; - }; + test_path = path_from_root('tests', 'core', 'test_conststructs') + src, output = (test_path + s for s in ('.in', '.out')) - int main( int argc, const char *argv[] ) { - int before = 70; - IUB iub[] = { - { 'a', 0.3029549426680, 5 }, - { 'c', 0.15, 4 }, - { 'g', 0.12, 3 }, - { 't', 0.27, 2 }, - }; - int after = 90; - printf("*%d,%d,%d,%d,%d,%d*\\n", before, iub[0].c, int(iub[1].p*100), iub[2].pi, int(iub[0].p*10000), after); - return 0; - } - ''' - self.do_run(src, '*70,97,15,3,3029,90*') + self.do_run_from_file(src, output) def test_bigarray(self): if self.emcc_args is None: return self.skip('need ta2 to compress type data on zeroinitializers') |