From 938b5d8590361acf871fddb9149fe725f65d781f Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Mon, 8 May 2023 10:44:58 +0200 Subject: Exclude JRuby and Truffleruby at retrieval of function types ..until necessary native methods are added. --- spec/ffi/library_spec.rb | 3 +++ spec/ffi/struct_by_ref_spec.rb | 3 +++ spec/ffi/variadic_spec.rb | 3 +++ 3 files changed, 9 insertions(+) diff --git a/spec/ffi/library_spec.rb b/spec/ffi/library_spec.rb index 9bbbd6c..8691b17 100644 --- a/spec/ffi/library_spec.rb +++ b/spec/ffi/library_spec.rb @@ -228,6 +228,9 @@ describe "Library" do end it "can reveal the function type" 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' + mod = Module.new do |m| m.extend FFI::Library ffi_lib File.expand_path(TestLibrary::PATH) diff --git a/spec/ffi/struct_by_ref_spec.rb b/spec/ffi/struct_by_ref_spec.rb index f664937..a775f92 100644 --- a/spec/ffi/struct_by_ref_spec.rb +++ b/spec/ffi/struct_by_ref_spec.rb @@ -41,6 +41,9 @@ describe FFI::Struct, ' by_ref' do 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) diff --git a/spec/ffi/variadic_spec.rb b/spec/ffi/variadic_spec.rb index 4d3f1c2..b528c09 100644 --- a/spec/ffi/variadic_spec.rb +++ b/spec/ffi/variadic_spec.rb @@ -40,6 +40,9 @@ describe "Function with variadic arguments" do end it "can reveal its return and parameters" 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' + fun = LibTest.attached_functions[:testBlockingWRva] expect(fun.param_types).to eq([FFI::Type::POINTER, FFI::Type::CHAR, FFI::Type::VARARGS]) expect(fun.return_type).to eq(FFI::Type::INT8) -- cgit v1.2.1