summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2023-05-08 10:44:58 +0200
committerLars Kanis <lars@greiz-reinsdorf.de>2023-05-08 10:44:58 +0200
commit938b5d8590361acf871fddb9149fe725f65d781f (patch)
treeebe3122c448c2a879395ba100b3726a936a36b71
parent9ff5782a0129e9025aa20e334ebf1ea77288edf7 (diff)
downloadffi-938b5d8590361acf871fddb9149fe725f65d781f.tar.gz
Exclude JRuby and Truffleruby at retrieval of function types
..until necessary native methods are added.
-rw-r--r--spec/ffi/library_spec.rb3
-rw-r--r--spec/ffi/struct_by_ref_spec.rb3
-rw-r--r--spec/ffi/variadic_spec.rb3
3 files changed, 9 insertions, 0 deletions
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)