Skip to content

Commit 42d79ba

Browse files
committed
Add expectations in handle_conversion_spec.rb
* nativeconversion.mspec shouldn't use `should` so if we enable it by default we still detect examples without `should`.
1 parent 90ee82f commit 42d79ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec/truffle/capi/handle_conversion_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@
1313
guard -> { Truffle::Boot.get_option('cexts-to-native-count') == true } do
1414
describe "Native handle conversion" do
1515
it "converts no handles when comparing a VALUE with a constant" do
16-
CAPIHandleConversionTest.new.value_comparison_with_nil(Object.new)
16+
CAPIHandleConversionTest.new.value_comparison_with_nil(Object.new).should == false
1717
end
1818

1919
it "converts no handles when accessing array elements via an RARRAY_PTR" do
2020
ary = Array.new(1000) { Object.new }
21-
CAPIHandleConversionTest.new.value_array_ptr_access([ary])
21+
CAPIHandleConversionTest.new.value_array_ptr_access(ary).should == ary[0]
2222
end
2323

2424
it "converts all elements to native handles when memcpying an RARRAY_PTR" do
2525
ary = Array.new(1000) { Object.new }
26-
CAPIHandleConversionTest.new.value_array_ptr_memcpy(ary)
26+
CAPIHandleConversionTest.new.value_array_ptr_memcpy(ary).should == ary[1]
2727
end
2828

2929
it "converts no handles when storing a VALUE in a static variable" do
30-
CAPIHandleConversionTest.new.value_store_in_static(Object.new)
30+
obj = Object.new
31+
CAPIHandleConversionTest.new.value_store_in_static(obj).should == obj
3132
end
3233
end
3334
end

0 commit comments

Comments
 (0)