File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 13
13
guard -> { Truffle ::Boot . get_option ( 'cexts-to-native-count' ) == true } do
14
14
describe "Native handle conversion" do
15
15
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
17
17
end
18
18
19
19
it "converts no handles when accessing array elements via an RARRAY_PTR" do
20
20
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 ]
22
22
end
23
23
24
24
it "converts all elements to native handles when memcpying an RARRAY_PTR" do
25
25
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 ]
27
27
end
28
28
29
29
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
31
32
end
32
33
end
33
34
end
You can’t perform that action at this time.
0 commit comments