mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Implement weak/unowned retain_n/release_n entry points. rdar://22629226"
This reverts commit r31989 because it broke the build due to a faulty assert that fires in the refcounting unit test. Swift SVN r31990
This commit is contained in:
@@ -145,21 +145,3 @@ TEST(RefcountingTest, unknown_retain_release_n) {
|
||||
EXPECT_EQ(1u, value);
|
||||
}
|
||||
|
||||
TEST(RefcountingTest, unowned_retain_release_n) {
|
||||
size_t value = 0;
|
||||
auto object = allocTestObject(&value, 1);
|
||||
EXPECT_EQ(0u, value);
|
||||
swift_weakRetain_n(object, 32);
|
||||
swift_weakRetain(object);
|
||||
EXPECT_EQ(34u, swift_weakRetainCount(object));
|
||||
swift_weakRelease_n(object, 31);
|
||||
EXPECT_EQ(3u, swift_weakRetainCount(object));
|
||||
swift_weakRelease(object);
|
||||
EXPECT_EQ(2u, swift_weakRetainCount(object));
|
||||
swift_weakRelease_n(object, 1);
|
||||
EXPECT_EQ(1u, swift_weakRetainCount(object));
|
||||
swift_weakRelease(object);
|
||||
EXPECT_EQ(0u, swift_weakRetainCount(object));
|
||||
swift_release(object);
|
||||
EXPECT_EQ(1u, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user