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:
Watson
2013-12-14 18:53:36 +09:00
parent 01c11e428f
commit 01ca3a9b6e

View File

@@ -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