diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-06 20:32:50 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:49 +0200 |
commit | bb0344a2537a908492b2c164996d910f6dd7ac3a (patch) | |
tree | 46f4feee1402effe27274f088ab1186e2fe5af50 | |
parent | f8c123951da867d39ab36d11b372307e51001281 (diff) |
Use do_run_from_file() for test_i64_zextneg
-rw-r--r-- | tests/core/test_i64_zextneg.in | 16 | ||||
-rw-r--r-- | tests/core/test_i64_zextneg.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 19 |
3 files changed, 20 insertions, 16 deletions
diff --git a/tests/core/test_i64_zextneg.in b/tests/core/test_i64_zextneg.in new file mode 100644 index 00000000..3f77131d --- /dev/null +++ b/tests/core/test_i64_zextneg.in @@ -0,0 +1,16 @@ + + #include <stdint.h> + #include <stdio.h> + + int main(int argc, char *argv[]) + { + uint8_t byte = 0x80; + uint16_t two = byte; + uint32_t four = byte; + uint64_t eight = byte; + + printf("value: %d,%d,%d,%lld.\n", byte, two, four, eight); + + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_i64_zextneg.out b/tests/core/test_i64_zextneg.out new file mode 100644 index 00000000..e2d9fd34 --- /dev/null +++ b/tests/core/test_i64_zextneg.out @@ -0,0 +1 @@ +value: 128,128,128,128.
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index af47672d..0a083a80 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -387,23 +387,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co def test_i64_zextneg(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2') - src = r''' - #include <stdint.h> - #include <stdio.h> - - int main(int argc, char *argv[]) - { - uint8_t byte = 0x80; - uint16_t two = byte; - uint32_t four = byte; - uint64_t eight = byte; - - printf("value: %d,%d,%d,%lld.\n", byte, two, four, eight); + test_path = path_from_root('tests', 'core', 'test_i64_zextneg') + src, output = (test_path + s for s in ('.in', '.out')) - return 0; - } - ''' - self.do_run(src, 'value: 128,128,128,128.') + self.do_run_from_file(src, output) def test_i64_7z(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2') |