aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 12:24:33 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:55 +0200
commit97254a666458b1eb89a9d6df63f6b8dbf1504087 (patch)
tree2452aa67db54f52e7703c389f032774b84e68a6d /tests/test_core.py
parente4d05a96412b44b978d3b4f8a126b659738d56bf (diff)
Use do_run_from_file() for test_bigarray
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index f5285db0..e5874a6a 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1739,26 +1739,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_bigarray(self):
if self.emcc_args is None: return self.skip('need ta2 to compress type data on zeroinitializers')
- # avoid "array initializer too large" errors
- src = r'''
- #include <stdio.h>
- #include <assert.h>
-
- #define SIZE (1024*100)
- struct Struct {
- char x;
- int y;
- };
- Struct buffy[SIZE];
+ test_path = path_from_root('tests', 'core', 'test_bigarray')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main() {
- for (int i = 0; i < SIZE; i++) { assert(buffy[i].x == 0 && buffy[i].y == 0); } // we were zeroinitialized
- for (int i = 0; i < SIZE; i++) { buffy[i].x = i*i; buffy[i].y = i*i*i; } // we can save data
- printf("*%d*\n", buffy[SIZE/3].x);
- return 0;
- }
- '''
- self.do_run(src, '*57*')
+ self.do_run_from_file(src, output)
def test_mod_globalstruct(self):
src = '''