aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 12:19:18 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:55 +0200
commite4a726c7cc08bf3dbfe2b67927bf4f17390bc134 (patch)
treeb445c6c54f2aa4122133cbea099d9275310ba71e /tests/test_core.py
parent1f8a2909f0ac04a5c1960092b6f32e7645a430ca (diff)
Use do_run_from_file() for test_array2b
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py20
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index d9967858..d3afa540 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1719,24 +1719,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_array2b(self):
- src = '''
- #include <stdio.h>
-
- static const struct {
- unsigned char left;
- unsigned char right;
- } prioritah[] = {
- {6, 6}, {6, 6}, {7, 95}, {7, 7}
- };
-
- int main() {
- printf("*%d,%d\\n", prioritah[1].left, prioritah[1].right);
- printf("%d,%d*\\n", prioritah[2].left, prioritah[2].right);
- return 0;
- }
- '''
- self.do_run(src, '*6,6\n7,95*')
+ test_path = path_from_root('tests', 'core', 'test_array2b')
+ src, output = (test_path + s for s in ('.in', '.out'))
+ self.do_run_from_file(src, output)
def test_constglobalstructs(self):
src = '''