diff --git a/basis/compiler/tests/alien.factor b/basis/compiler/tests/alien.factor index bf640477aa..688d422191 100755 --- a/basis/compiler/tests/alien.factor +++ b/basis/compiler/tests/alien.factor @@ -889,8 +889,27 @@ STRUCT: bool-and-ptr { ptr void* } ; FUNCTION: bool-and-ptr ffi_test_61 ( ) ; + { S{ bool-and-ptr { b t } { ptr f } } -} [ - ffi_test_61 -] unit-test +} [ ffi_test_61 ] unit-test + +STRUCT: uint-pair + { a uint } + { b uint } ; + +FUNCTION: uint-pair ffi_test_62 ( ) ; + +{ + S{ uint-pair { a 0xabcdefab } { b 0x12345678 } } +} [ ffi_test_62 ] unit-test + +STRUCT: ulonglong-pair + { a ulonglong } + { b ulonglong } ; + +FUNCTION: ulonglong-pair ffi_test_63 ( ) ; + +{ + S{ ulonglong-pair { a 0xabcdefabcdefabcd } { b 0x1234567891234567 } } +} [ ffi_test_63 ] unit-test diff --git a/vm/ffi_test.c b/vm/ffi_test.c index 3fbd9a9508..65b24faa71 100644 --- a/vm/ffi_test.c +++ b/vm/ffi_test.c @@ -313,3 +313,17 @@ struct bool_and_ptr ffi_test_61() { bap.ptr = NULL; return bap; } + +struct uint_pair ffi_test_62() { + struct uint_pair uip; + uip.a = 0xabcdefab; + uip.b = 0x12345678; + return uip; +} + +struct ulonglong_pair ffi_test_63() { + struct ulonglong_pair ullp; + ullp.a = 0xabcdefabcdefabcd; + ullp.b = 0x1234567891234567; + return ullp; +} diff --git a/vm/ffi_test.h b/vm/ffi_test.h index b6587730fe..a36d66cf43 100644 --- a/vm/ffi_test.h +++ b/vm/ffi_test.h @@ -209,3 +209,17 @@ struct bool_and_ptr { }; FACTOR_EXPORT struct bool_and_ptr ffi_test_61(); + +struct uint_pair { + unsigned int a; + unsigned int b; +}; + +FACTOR_EXPORT struct uint_pair ffi_test_62(); + +struct ulonglong_pair { + unsigned long long a; + unsigned long long b; +}; + +FACTOR_EXPORT struct ulonglong_pair ffi_test_63();