summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-06 23:30:27 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:52 +0200
commitb738dbadbbd9a49d1ae093c451245f20d7664e09 (patch)
tree02896478e855bfd7420493ec2b1b55814ef781c9 /tests/test_core.py
parent64b0558bb691baefb7def2b3520e84b0369ddfd3 (diff)
Use do_run_from_file() for test_funcs
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index fb4a4ff8..823c0285 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -958,19 +958,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_funcs(self):
- src = '''
- #include <stdio.h>
- int funcy(int x)
- {
- return x*9;
- }
- int main()
- {
- printf("*%d,%d*\\n", funcy(8), funcy(10));
- return 0;
- }
- '''
- self.do_run(src, '*72,90*')
+ test_path = path_from_root('tests', 'core', 'test_funcs')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
def test_structs(self):
src = '''