mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-05-17 11:06:31 +08:00
add test for RM-356
However, this test causes a crash as following when run with spec. so far disabled. Assertion failed: (node->objc_imp == imp), function add_method, file vm.cpp, line 1115.
This commit is contained in:
@@ -555,6 +555,13 @@ describe "Struct" do
|
||||
|
||||
state.inspect
|
||||
end
|
||||
|
||||
def test_struct_setter
|
||||
name = @cat.name
|
||||
@cat.name = "foo"
|
||||
|
||||
name.inspect
|
||||
end
|
||||
end
|
||||
|
||||
# RM-355
|
||||
@@ -569,6 +576,19 @@ describe "Struct" do
|
||||
# test_struct_aset should not cause a crash
|
||||
1.should == 1
|
||||
end
|
||||
|
||||
# RM-356
|
||||
xit "setter method should not released the object" do
|
||||
@foo = TestStruct.new
|
||||
|
||||
5.times do
|
||||
@foo.performSelectorOnMainThread(:'test_struct_setter', withObject:nil, waitUntilDone:false)
|
||||
NSRunLoop.currentRunLoop.runUntilDate(NSDate.dateWithTimeIntervalSinceNow(0.2))
|
||||
end
|
||||
|
||||
# test_struct_setter should not cause a crash
|
||||
1.should == 1
|
||||
end
|
||||
end
|
||||
|
||||
# RM-290
|
||||
|
||||
Reference in New Issue
Block a user