summaryrefslogtreecommitdiff
path: root/test-suite/standalone/test-ffi-lib.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>2012-05-20 18:34:56 -0400
committerKen Raeburn <raeburn@raeburn.org>2012-05-21 01:14:44 -0400
commit8e7cacf139134fdf1f8579384e83b2973992d7d8 (patch)
tree5f084b3077abc43af7678609c49aeae004a65427 /test-suite/standalone/test-ffi-lib.c
parent499f3de0d746191d92432ab90b585bad5ef1f3cc (diff)
downloadguile-wip-raeburn-misc.tar.gz
Test signed narrow arguments in FFI better.wip-raeburn-misc
* test-suite/standalone/test-ffi-lib.c (test_ffi_s16_s8): New function. * test-suite/standalone/test-ffi: Test it. Also test test_ffi_sum with both positive and negative values for the narrower-than-64-bit arguments.
Diffstat (limited to 'test-suite/standalone/test-ffi-lib.c')
-rw-r--r--test-suite/standalone/test-ffi-lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test-suite/standalone/test-ffi-lib.c b/test-suite/standalone/test-ffi-lib.c
index 37d6e43cc..50a200886 100644
--- a/test-suite/standalone/test-ffi-lib.c
+++ b/test-suite/standalone/test-ffi-lib.c
@@ -87,6 +87,12 @@ scm_t_int16 test_ffi_s16_u8 (scm_t_uint8 a)
return -20000 + a;
}
+scm_t_int16 test_ffi_s16_s8 (scm_t_int8 a);
+scm_t_int16 test_ffi_s16_s8 (scm_t_int8 a)
+{
+ return -20000 + a;
+}
+
scm_t_int16 test_ffi_s16_s64 (scm_t_int64 a);
scm_t_int16 test_ffi_s16_s64 (scm_t_int64 a)
{