diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 59a5261c..827cbf7d 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2576,32 +2576,10 @@ The current type of b is: 9 self.do_run_from_file(src, output) def test_flexarray_struct(self): - src = r''' -#include <stdint.h> -#include <stdlib.h> -#include <stdio.h> - -typedef struct -{ - uint16_t length; - struct - { - int32_t int32; - } value[]; -} Tuple; - -int main() { - Tuple T[10]; - Tuple *t = &T[0]; - - t->length = 4; - t->value->int32 = 100; + test_path = path_from_root('tests', 'core', 'test_flexarray_struct') + src, output = (test_path + s for s in ('.in', '.out')) - printf("(%d, %d)\n", t->length, t->value->int32); - return 0; -} -''' - self.do_run(src, '(4, 100)') + self.do_run_from_file(src, output) def test_bsearch(self): if Settings.QUANTUM_SIZE == 1: return self.skip('Test cannot work with q1') |