summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py29
1 files changed, 3 insertions, 26 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index da74e5a0..a69764eb 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -2496,33 +2496,10 @@ The current type of b is: 9
self.do_run(src, 'fault on write to 0' if not Settings.ASM_JS else 'abort()')
def test_trickystring(self):
- src = r'''
- #include <stdio.h>
-
- typedef struct
- {
- int (*f)(void *);
- void *d;
- char s[16];
- } LMEXFunctionStruct;
-
- int f(void *user)
- {
- return 0;
- }
-
- static LMEXFunctionStruct const a[] =
- {
- {f, (void *)(int)'a', "aa"}
- };
+ test_path = path_from_root('tests', 'core', 'test_trickystring')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main()
- {
- printf("ok\n");
- return a[0].f(a[0].d);
- }
- '''
- self.do_run(src, 'ok\n')
+ self.do_run_from_file(src, output)
def test_statics(self):
# static initializers save i16 but load i8 for some reason (or i64 and load i8)