diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 714254e4..d34313f7 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2165,20 +2165,10 @@ The current type of b is: 9 ''') def test_functionpointer_libfunc_varargs(self): - src = r''' - #include <stdio.h> - #include <fcntl.h> - typedef int (*fp_t)(int, int, ...); - int main(int argc, char **argv) { - fp_t fp = &fcntl; - if (argc == 1337) fp = (fp_t)&main; - (*fp)(0, 10); - (*fp)(0, 10, 5); - printf("waka\n"); - return 0; - } - ''' - self.do_run(src, '''waka''') + test_path = path_from_root('tests', 'core', 'test_functionpointer_libfunc_varargs') + src, output = (test_path + s for s in ('.in', '.out')) + + self.do_run_from_file(src, output) def test_structbyval(self): Settings.INLINING_LIMIT = 50 |