aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py37
1 files changed, 3 insertions, 34 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index cb319500..47a39ba7 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4232,41 +4232,10 @@ PORT: 3979
self.do_run_from_file(src, output)
def test_phiundef(self):
- src = r'''
-#include <stdlib.h>
-#include <stdio.h>
-
-static int state;
-
-struct my_struct {
-union {
- struct {
- unsigned char a;
- unsigned char b;
- } c;
- unsigned int d;
-} e;
-unsigned int f;
-};
-
-int main(int argc, char **argv) {
- struct my_struct r;
-
- state = 0;
-
- for (int i=0;i<argc+10;i++)
- {
- if (state % 2 == 0)
- r.e.c.a = 3;
- else
- printf("%d\n", r.e.c.a);
- state++;
- }
- return 0;
-}
- '''
+ test_path = path_from_root('tests', 'core', 'test_phiundef')
+ src, output = (test_path + s for s in ('.in', '.out'))
- self.do_run(src, '3\n3\n3\n3\n3\n')
+ self.do_run_from_file(src, output)
# libc++ tests