From 764addb9b21a970823058860672a08fcfe6ffbf9 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 9 Oct 2007 02:08:09 -0400 Subject: [PATCH] VM portion of new unit tests --- vm/ffi_test.c | 20 ++++++++++++++++++++ vm/ffi_test.h | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/vm/ffi_test.c b/vm/ffi_test.c index bb8a38b0d9..f6e70fd6ac 100644 --- a/vm/ffi_test.c +++ b/vm/ffi_test.c @@ -225,3 +225,23 @@ struct test_struct_7 ffi_test_30(void) } void ffi_test_31(int x0, int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, int x10, int x11, int x12, int x13, int x14, int x15, int x16, int x17, int x18, int x19, int x20, int x21, int x22, int x23, int x24, int x25, int x26, int x27, int x28, int x29, int x30, int x31, int x32, int x33, int x34, int x35, int x36, int x37, int x38, int x39, int x40, int x41) { } + +double ffi_test_32(struct test_struct_8 x, int y) +{ + return (x.x + x.y) * y; +} + +double ffi_test_33(struct test_struct_9 x, int y) +{ + return (x.x + x.y) * y; +} + +double ffi_test_34(struct test_struct_10 x, int y) +{ + return (x.x + x.y) * y; +} + +double ffi_test_35(struct test_struct_11 x, int y) +{ + return (x.x + x.y) * y; +} diff --git a/vm/ffi_test.h b/vm/ffi_test.h index 8e392034ce..27e402b74f 100644 --- a/vm/ffi_test.h +++ b/vm/ffi_test.h @@ -49,3 +49,11 @@ DLLEXPORT struct test_struct_6 ffi_test_29(void); struct test_struct_7 { char x, y, z, a, b, c, d; }; DLLEXPORT struct test_struct_7 ffi_test_30(void); DLLEXPORT void ffi_test_31(int x0, int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, int x10, int x11, int x12, int x13, int x14, int x15, int x16, int x17, int x18, int x19, int x20, int x21, int x22, int x23, int x24, int x25, int x26, int x27, int x28, int x29, int x30, int x31, int x32, int x33, int x34, int x35, int x36, int x37, int x38, int x39, int x40, int x41); +struct test_struct_8 { double x; double y; }; +DLLEXPORT double ffi_test_32(struct test_struct_8 x, int y); +struct test_struct_9 { float x; float y; }; +DLLEXPORT double ffi_test_33(struct test_struct_9 x, int y); +struct test_struct_10 { float x; int y; }; +DLLEXPORT double ffi_test_34(struct test_struct_10 x, int y); +struct test_struct_11 { int x; int y; }; +DLLEXPORT double ffi_test_35(struct test_struct_11 x, int y);