diff options
author | pavel <pavel.rosicky@easy.cz> | 2020-08-30 02:42:08 +0200 |
---|---|---|
committer | pavel <pavel.rosicky@easy.cz> | 2020-08-30 11:54:48 +0200 |
commit | 4203d75d8ece06f2aeea2f4aaee0caf7937730f8 (patch) | |
tree | 2e0ddd18e3606c241acb2b5ef6f3be5a000e32c8 /spec | |
parent | 1091ff7e7efe7bb49231a4a0107dcd2022ed7642 (diff) | |
download | ffi-4203d75d8ece06f2aeea2f4aaee0caf7937730f8.tar.gz |
jruby fixes
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ffi/long_double_spec.rb | 2 | ||||
-rw-r--r-- | spec/ffi/rbx/attach_function_spec.rb | 2 | ||||
-rw-r--r-- | spec/ffi/struct_spec.rb | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/spec/ffi/long_double_spec.rb b/spec/ffi/long_double_spec.rb index 3128d96..c2b22cf 100644 --- a/spec/ffi/long_double_spec.rb +++ b/spec/ffi/long_double_spec.rb @@ -47,4 +47,4 @@ describe ":long_double arguments and return values" do expect(v).to be_within(0.01).of(0.1) end end -end if RUBY_ENGINE != "truffleruby" +end unless ['truffleruby', 'jruby'].include?(RUBY_ENGINE) diff --git a/spec/ffi/rbx/attach_function_spec.rb b/spec/ffi/rbx/attach_function_spec.rb index 35772a9..b83f91e 100644 --- a/spec/ffi/rbx/attach_function_spec.rb +++ b/spec/ffi/rbx/attach_function_spec.rb @@ -35,4 +35,4 @@ module RbxAttachFunctionSpecs expect(t[:tv_usec]).to be_kind_of(Numeric) end end -end +end unless RUBY_ENGINE == 'jruby' diff --git a/spec/ffi/struct_spec.rb b/spec/ffi/struct_spec.rb index f1f4bcc..d73088a 100644 --- a/spec/ffi/struct_spec.rb +++ b/spec/ffi/struct_spec.rb @@ -364,13 +364,17 @@ module StructSpecsStructTests int_field_test(:int, [ 0, 0x7fffffff, -0x80000000, -1 ]) int_field_test(:uint, [ 0, 0x7fffffff, 0x80000000, 0xffffffff ]) int_field_test(:long_long, [ 0, 0x7fffffffffffffff, -0x8000000000000000, -1 ]) - int_field_test(:ulong_long, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ]) + if RUBY_ENGINE != 'jruby' # https://github.com/jnr/jffi/issues/87 + int_field_test(:ulong_long, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ]) + end if FFI::Platform::LONG_SIZE == 32 int_field_test(:long, [ 0, 0x7fffffff, -0x80000000, -1 ]) int_field_test(:ulong, [ 0, 0x7fffffff, 0x80000000, 0xffffffff ]) else int_field_test(:long, [ 0, 0x7fffffffffffffff, -0x8000000000000000, -1 ]) - int_field_test(:ulong, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ]) + if RUBY_ENGINE != 'jruby' # https://github.com/jruby/jruby/issues/6376 + int_field_test(:ulong, [ 0, 0x7fffffffffffffff, 0x8000000000000000, 0xffffffffffffffff ]) + end end it ":float field r/w" do |