summaryrefslogtreecommitdiffstats
path: root/tests/016/arith.tl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/016/arith.tl')
-rw-r--r--tests/016/arith.tl21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/016/arith.tl b/tests/016/arith.tl
index 1609833f..43efb6bb 100644
--- a/tests/016/arith.tl
+++ b/tests/016/arith.tl
@@ -121,3 +121,24 @@
#xAABBCCDDEE)
(test (ffi-get #b'000000AABBCCDDEE' (ffi be-int64))
#xAABBCCDDEE)
+
+(test (mequal (ffi-put #x-8000 (ffi int16))
+ #b'0080'
+ #b'8000') t)
+
+(test (ffi-get (ffi-put #x-8000 (ffi int16)) (ffi int16))
+ #x-8000)
+
+(test (mequal (ffi-put #x-80000000 (ffi int32))
+ #b'00000080'
+ #b'80000000') t)
+
+(test (ffi-get (ffi-put #x-80000000 (ffi int32)) (ffi int32))
+ #x-80000000)
+
+(test (mequal (ffi-put #x-8000000000000000 (ffi int64))
+ #b'0000000000000080'
+ #b'8000000000000000') t)
+
+(test (ffi-get (ffi-put #x-8000000000000000 (ffi int64)) (ffi int64))
+ #x-8000000000000000)