Skip to content

Commit

Permalink
Cleanup tests for let-shorthand workaround that was already removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Aug 20, 2023
1 parent d5dde3f commit 94be1b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 91 deletions.
63 changes: 0 additions & 63 deletions Tests/Fixtures/RetentionFixtures/testLetShorthandSyntax.swift

This file was deleted.

28 changes: 0 additions & 28 deletions Tests/PeripheryTests/RetentionTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1004,34 +1004,6 @@ final class RetentionTest: FixtureSourceGraphTestCase {
}
}

func testLetShorthandSyntax() {
analyze(retainPublic: true) {
assertReferenced(.class("FixtureClass117")) {
self.assertReferenced(.varInstance("simpleProperty"))
self.assertNotAssignOnlyProperty(.varInstance("simpleProperty"))

self.assertReferenced(.varInstance("guardedSimpleProperty"))
self.assertReferenced(.varInstance("complexProperty"))
self.assertReferenced(.varInstance("propertyReferencedFromExtension"))
self.assertReferenced(.varInstance("computedPropertyInExtension"))
self.assertReferenced(.varInstance("propertyReferencedFromNestedFunction"))
self.assertReferenced(.varInstance("propertyReferencedFromPropertyAccessor"))

self.assertReferenced(.varInstance("propertyReferencedFromDeepChain"))
self.assertNotAssignOnlyProperty(.varInstance("propertyReferencedFromDeepChain"))
}

#if swift(>=5.8)
self.assertReferenced(.varGlobal("fixtureClass117StaticProperty"))
#else
// This property should be referenced, but the let shorthand workaround doesn't
// handle properties at global (file) scope. This will remain broken until the
// issue is resolved in Swift: https://github.com/apple/swift/issues/61509.
self.assertNotReferenced(.varGlobal("fixtureClass117StaticProperty"))
#endif
}
}

func testDoesNotRetainLazyProperty() {
analyze(retainPublic: true) {
assertReferenced(.class("FixtureClass36")) {
Expand Down

0 comments on commit 94be1b9

Please sign in to comment.