summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-06 23:01:25 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:51 +0200
commit141e48f507d239674ade401f26d2edc546263904 (patch)
treedd814af454bee453282105011440d74b9cfda8cc /tests/test_core.py
parent1bcfea047f9b3f0c3d5ce821c4ada85a8a46c205 (diff)
Use do_run_from_file() for test_if_else
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 7c69321e..6c17c5e0 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -900,20 +900,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_if_else(self):
- src = '''
- #include <stdio.h>
- int main()
- {
- int x = 5;
- if (x > 10) {
- printf("*yes*\\n");
- } else {
- printf("*no*\\n");
- }
- return 0;
- }
- '''
- self.do_run(src, '*no*')
+ test_path = path_from_root('tests', 'core', 'test_if_else')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
def test_loop(self):
src = '''