diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 13:20:58 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:56 +0200 |
commit | c7f686aeec5b789d3bd0d17bb8893852117febc0 (patch) | |
tree | 9b1eebf840d315d2987347546660dff7c0697938 /tests/test_core.py | |
parent | 3adcf1a472cfa37250660193366006291d2b15e4 (diff) |
Use do_run_from_file() for test_functionpointer_libfunc_varargs
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 |