[test] add test for RM-368

This commit is contained in:
Watson
2013-12-25 12:08:10 +09:00
parent 6c9b7aefd7
commit 289e00dcf4

View File

@@ -521,6 +521,16 @@ describe "Array" do
@array.unshift("a")
end
def test_clear
obj = @array[0]
@array.clear
obj.inspect
@array = ["a", "b", "c"]
end
end
# RM-354
@@ -535,6 +545,19 @@ describe "Array" do
# test_array_delete should not cause a crash
1.should == 1
end
# RM-368
it "#clear should not released the object" do
@foo = TestArray.new
5.times do
@foo.performSelectorOnMainThread(:'test_clear', withObject:nil, waitUntilDone:false)
NSRunLoop.currentRunLoop.runUntilDate(NSDate.dateWithTimeIntervalSinceNow(0.2))
end
# test_clear should not cause a crash
1.should == 1
end
end
describe "Struct" do