Add some more tests for complex numbers in FFI
parent
05632b8525
commit
173b0ee78d
|
@ -559,9 +559,17 @@ FUNCTION: test_struct_14 ffi_test_44 ( ) ; inline
|
||||||
|
|
||||||
[ ] [ stack-frame-bustage 2drop ] unit-test
|
[ ] [ stack-frame-bustage 2drop ] unit-test
|
||||||
|
|
||||||
FUNCTION: complex-float ffi_test_45 ( complex-float x, complex-double y ) ;
|
FUNCTION: complex-float ffi_test_45 ( int x ) ;
|
||||||
|
|
||||||
|
[ C{ 0.0 3.0 } ] [ 3 ffi_test_45 ] unit-test
|
||||||
|
|
||||||
|
FUNCTION: complex-double ffi_test_46 ( int x ) ;
|
||||||
|
|
||||||
|
[ C{ 0.0 3.0 } ] [ 3 ffi_test_46 ] unit-test
|
||||||
|
|
||||||
|
FUNCTION: complex-float ffi_test_47 ( complex-float x, complex-double y ) ;
|
||||||
|
|
||||||
[ C{ 4.0 4.0 } ] [
|
[ C{ 4.0 4.0 } ] [
|
||||||
C{ 1.0 2.0 }
|
C{ 1.0 2.0 }
|
||||||
C{ 1.5 1.0 } ffi_test_45
|
C{ 1.5 1.0 } ffi_test_47
|
||||||
] unit-test
|
] unit-test
|
|
@ -303,7 +303,17 @@ struct test_struct_14 ffi_test_44(void)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
_Complex float ffi_test_45(_Complex float x, _Complex double y)
|
_Complex float ffi_test_45(int x)
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
_Complex double ffi_test_46(int x)
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
_Complex float ffi_test_47(_Complex float x, _Complex double y)
|
||||||
{
|
{
|
||||||
return x + 2 * y;
|
return x + 2 * y;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,4 +89,8 @@ DLLEXPORT struct test_struct_16 ffi_test_43(float x, int a);
|
||||||
|
|
||||||
DLLEXPORT struct test_struct_14 ffi_test_44();
|
DLLEXPORT struct test_struct_14 ffi_test_44();
|
||||||
|
|
||||||
DLLEXPORT _Complex float ffi_test_45(_Complex float x, _Complex double y);
|
DLLEXPORT _Complex float ffi_test_45(int x);
|
||||||
|
|
||||||
|
DLLEXPORT _Complex double ffi_test_46(int x);
|
||||||
|
|
||||||
|
DLLEXPORT _Complex float ffi_test_47(_Complex float x, _Complex double y);
|
||||||
|
|
Loading…
Reference in New Issue