summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/core/test_i64_llabs.in9
-rw-r--r--tests/core/test_i64_llabs.out1
-rw-r--r--tests/test_core.py12
3 files changed, 14 insertions, 8 deletions
diff --git a/tests/core/test_i64_llabs.in b/tests/core/test_i64_llabs.in
new file mode 100644
index 00000000..10961970
--- /dev/null
+++ b/tests/core/test_i64_llabs.in
@@ -0,0 +1,9 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int main(int argc, char ** argv) {
+ printf("%lld,%lld\n", llabs(-576460752303423489), llabs(576460752303423489));
+ return 0;
+ }
+ \ No newline at end of file
diff --git a/tests/core/test_i64_llabs.out b/tests/core/test_i64_llabs.out
new file mode 100644
index 00000000..e1ec5062
--- /dev/null
+++ b/tests/core/test_i64_llabs.out
@@ -0,0 +1 @@
+576460752303423489,576460752303423489 \ No newline at end of file
diff --git a/tests/test_core.py b/tests/test_core.py
index 5647d231..af47672d 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -378,15 +378,11 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_i64_llabs(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2')
Settings.PRECISE_I64_MATH = 2
- self.do_run(r'''
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char ** argv) {
- printf("%lld,%lld\n", llabs(-576460752303423489), llabs(576460752303423489));
- return 0;
- }
- ''', '576460752303423489,576460752303423489')
+ test_path = path_from_root('tests', 'core', 'test_i64_llabs')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
def test_i64_zextneg(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2')