From d7763d6b71c031da74f38933ebb4c99363a8a10a Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 19 Apr 2008 02:11:30 -0500 Subject: [PATCH] Add another unit test --- core/alien/compiler/compiler-tests.factor | 4 ++++ vm/ffi_test.c | 7 +++++++ vm/ffi_test.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/core/alien/compiler/compiler-tests.factor b/core/alien/compiler/compiler-tests.factor index f0c0706a3c..d1a14dd758 100755 --- a/core/alien/compiler/compiler-tests.factor +++ b/core/alien/compiler/compiler-tests.factor @@ -280,6 +280,10 @@ FUNCTION: double ffi_test_36 ( test-struct-12 x ) ; [ 1.23456 ] [ 1.23456 make-struct-12 ffi_test_36 ] unit-test +FUNCTION: ulonglong ffi_test_38 ( ulonglong x, ulonglong y ) ; + +[ t ] [ 31 2^ 32 2^ ffi_test_38 63 2^ = ] unit-test + ! Test callbacks : callback-1 "void" { } "cdecl" [ ] alien-callback ; diff --git a/vm/ffi_test.c b/vm/ffi_test.c index 48b6297cb8..5dcff831df 100755 --- a/vm/ffi_test.c +++ b/vm/ffi_test.c @@ -260,3 +260,10 @@ int ffi_test_37(int (*f)(int, int, int)) fflush(stdout); return global_var; } + +unsigned long long ffi_test_38(unsigned long long x, unsigned long long y) +{ + return x * y; +} + + diff --git a/vm/ffi_test.h b/vm/ffi_test.h index 2edebd96f1..9a3f4dded2 100755 --- a/vm/ffi_test.h +++ b/vm/ffi_test.h @@ -63,3 +63,5 @@ struct test_struct_12 { int a; double x; }; DLLEXPORT double ffi_test_36(struct test_struct_12 x); DLLEXPORT int ffi_test_37(int (*f)(int, int, int)); + +DLLEXPORT unsigned long long ffi_test_38(unsigned long long x, unsigned long long y);