aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 12:25:59 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:55 +0200
commit9858eb7a56cd620e2731a8bb08a12d331d470c92 (patch)
treed0c01ad9a540a417506caf23f2b8cccfafdc3197 /tests/test_core.py
parent97254a666458b1eb89a9d6df63f6b8dbf1504087 (diff)
Use do_run_from_file() for test_mod_globalstruct
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 e5874a6a..b4bdbe1c 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1745,26 +1745,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_mod_globalstruct(self):
- src = '''
- #include <stdio.h>
-
- struct malloc_params {
- size_t magic, page_size;
- };
-
- malloc_params mparams;
-
- #define SIZE_T_ONE ((size_t)1)
- #define page_align(S) (((S) + (mparams.page_size - SIZE_T_ONE)) & ~(mparams.page_size - SIZE_T_ONE))
+ test_path = path_from_root('tests', 'core', 'test_mod_globalstruct')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main()
- {
- mparams.page_size = 4096;
- printf("*%d,%d,%d,%d*\\n", mparams.page_size, page_align(1000), page_align(6000), page_align(66474));
- return 0;
- }
- '''
- self.do_run(src, '*4096,4096,8192,69632*')
+ self.do_run_from_file(src, output)
def test_pystruct(self):
src = '''