summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/core/test_i64_zextneg.in16
-rw-r--r--tests/core/test_i64_zextneg.out1
-rw-r--r--tests/test_core.py19
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')