summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 10:52:38 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:52 +0200
commit3ae52c48122ba894d3b4b2e93be8535b6720cc38 (patch)
tree6dbdb44f597b68220f6ff787a90325f46e68571d /tests/test_core.py
parent6749f88042d90dc2f50dc836f11d577fb7f16250 (diff)
Use do_run_from_file() for test_addr_of_stacked
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index ffbdf487..c6ab5ab9 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -996,21 +996,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run(self.gen_struct_src.replace('{{gen_struct}}', 'new S').replace('{{del_struct}}', 'delete'), '*51,62*')
def test_addr_of_stacked(self):
- src = '''
- #include <stdio.h>
- void alter(int *y)
- {
- *y += 5;
- }
- int main()
- {
- int x = 2;
- alter(&x);
- printf("*%d*\\n", x);
- return 0;
- }
- '''
- self.do_run(src, '*7*')
+ test_path = path_from_root('tests', 'core', 'test_addr_of_stacked')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
def test_globals(self):
src = '''