summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 8c098675..d9967858 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1713,22 +1713,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
''', ['2'], force_c=True)
def test_array2(self):
- src = '''
- #include <stdio.h>
-
- static const double grid[4][2] = {
- {-3/3.,-1/3.},{+1/3.,-3/3.},
- {-1/3.,+3/3.},{+3/3.,+1/3.}
- };
+ test_path = path_from_root('tests', 'core', 'test_array2')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main() {
- for (int i = 0; i < 4; i++)
- printf("%d:%.2f,%.2f ", i, grid[i][0], grid[i][1]);
- printf("\\n");
- return 0;
- }
- '''
- self.do_run(src, '0:-1.00,-0.33 1:0.33,-1.00 2:-0.33,1.00 3:1.00,0.33')
+ self.do_run_from_file(src, output)
def test_array2b(self):
src = '''