diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/ext/fiddle/libffi-3.2.1/testsuite/libffi.call/err_bad_typedef.c |
Fresh start
Diffstat (limited to 'jni/ruby/ext/fiddle/libffi-3.2.1/testsuite/libffi.call/err_bad_typedef.c')
-rw-r--r-- | jni/ruby/ext/fiddle/libffi-3.2.1/testsuite/libffi.call/err_bad_typedef.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/jni/ruby/ext/fiddle/libffi-3.2.1/testsuite/libffi.call/err_bad_typedef.c b/jni/ruby/ext/fiddle/libffi-3.2.1/testsuite/libffi.call/err_bad_typedef.c new file mode 100644 index 0000000..bf60161 --- /dev/null +++ b/jni/ruby/ext/fiddle/libffi-3.2.1/testsuite/libffi.call/err_bad_typedef.c @@ -0,0 +1,26 @@ +/* Area: ffi_prep_cif + Purpose: Test error return for bad typedefs. + Limitations: none. + PR: none. + Originator: Blake Chaffin 6/6/2007 */ + +/* { dg-do run } */ + +#include "ffitest.h" + +int main (void) +{ + ffi_cif cif; + ffi_type* arg_types[1]; + + ffi_type badType = ffi_type_void; + + arg_types[0] = NULL; + + badType.size = 0; + + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &badType, + arg_types) == FFI_BAD_TYPEDEF); + + exit(0); +} |