diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 6e4ef726..7b9cd750 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1532,24 +1532,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_funcptrfunc(self): - src = r''' - #include <stdio.h> - - typedef void (*funcptr)(int, int); - typedef funcptr (*funcptrfunc)(int); - - funcptr __attribute__ ((noinline)) getIt(int x) { - return (funcptr)x; - } + test_path = path_from_root('tests', 'core', 'test_funcptrfunc') + src, output = (test_path + s for s in ('.in', '.out')) - int main(int argc, char **argv) - { - funcptrfunc fpf = argc < 100 ? getIt : NULL; - printf("*%p*\n", fpf(argc)); - return 0; - } - ''' - self.do_run(src, '*0x1*') + self.do_run_from_file(src, output) def test_funcptr_namecollide(self): src = r''' |