diff options
Diffstat (limited to 'spec/ffi/struct_by_ref_spec.rb')
-rw-r--r-- | spec/ffi/struct_by_ref_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ffi/struct_by_ref_spec.rb b/spec/ffi/struct_by_ref_spec.rb index 0858423..a775f92 100644 --- a/spec/ffi/struct_by_ref_spec.rb +++ b/spec/ffi/struct_by_ref_spec.rb @@ -39,5 +39,14 @@ describe FFI::Struct, ' by_ref' do expect { @api.struct_test(other_class.new) }.to raise_error(TypeError) end + + it "can reveal the mapped type converter" do + skip 'this is not yet implemented on JRuby' if RUBY_ENGINE == 'jruby' + skip 'this is not yet implemented on Truffleruby' if RUBY_ENGINE == 'truffleruby' + + param_type = @api.attached_functions[:struct_test].param_types[0] + expect(param_type).to be_a(FFI::Type::Mapped) + expect(param_type.converter).to be_a(FFI::StructByReference) + end end |