@@ -434,7 +434,7 @@ class TestCodable : TestCodableSuper {
434434
435435 // MARK: - DateInterval
436436 @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
437- lazy var dateIntervalValues : [ Int : DateInterval ] = [
437+ static let dateIntervalValues : [ Int : DateInterval ] = [
438438 #line : DateInterval ( ) ,
439439 #line : DateInterval ( start: Date . distantPast, end: Date ( ) ) ,
440440 #line : DateInterval ( start: Date ( ) , end: Date . distantFuture) ,
@@ -443,14 +443,14 @@ class TestCodable : TestCodableSuper {
443443
444444 @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
445445 func test_DateInterval_JSON( ) {
446- for (testLine, interval) in dateIntervalValues {
446+ for (testLine, interval) in Self . dateIntervalValues {
447447 expectRoundTripEqualityThroughJSON ( for: interval, lineNumber: testLine)
448448 }
449449 }
450450
451451 @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
452452 func test_DateInterval_Plist( ) {
453- for (testLine, interval) in dateIntervalValues {
453+ for (testLine, interval) in Self . dateIntervalValues {
454454 expectRoundTripEqualityThroughPlist ( for: interval, lineNumber: testLine)
455455 }
456456 }
@@ -641,15 +641,15 @@ class TestCodable : TestCodableSuper {
641641
642642 // MARK: - Measurement
643643 @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
644- lazy var unitValues : [ Int : Dimension ] = [
644+ static let unitValues : [ Int : Dimension ] = [
645645 #line : UnitAcceleration . metersPerSecondSquared,
646646 #line : UnitMass . kilograms,
647647 #line : UnitLength . miles
648648 ]
649649
650650 @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
651651 func test_Measurement_JSON( ) {
652- for (testLine, unit) in unitValues {
652+ for (testLine, unit) in Self . unitValues {
653653 // FIXME: <rdar://problem/49026133>
654654 // Terminating due to uncaught exception NSInvalidArgumentException:
655655 // *** You must override baseUnit in your class NSDimension to define its base unit.
@@ -660,7 +660,7 @@ class TestCodable : TestCodableSuper {
660660
661661 @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
662662 func test_Measurement_Plist( ) {
663- for (testLine, unit) in unitValues {
663+ for (testLine, unit) in Self . unitValues {
664664 // FIXME: <rdar://problem/49026133>
665665 // Terminating due to uncaught exception NSInvalidArgumentException:
666666 // *** You must override baseUnit in your class NSDimension to define its base unit.
@@ -741,22 +741,22 @@ class TestCodable : TestCodableSuper {
741741
742742 // MARK: - PersonNameComponents
743743 @available ( macOS 10 . 11 , iOS 9 . 0 , watchOS 2 . 0 , tvOS 9 . 0 , * )
744- lazy var personNameComponentsValues : [ Int : PersonNameComponents ] = [
744+ static let personNameComponentsValues : [ Int : PersonNameComponents ] = [
745745 #line : makePersonNameComponents ( givenName: " John " , familyName: " Appleseed " ) ,
746746 #line : makePersonNameComponents ( givenName: " John " , familyName: " Appleseed " , nickname: " Johnny " ) ,
747747 #line : makePersonNameComponents ( namePrefix: " Dr. " , givenName: " Jane " , middleName: " A. " , familyName: " Appleseed " , nameSuffix: " Esq. " , nickname: " Janie " )
748748 ]
749749
750750 @available ( macOS 10 . 11 , iOS 9 . 0 , watchOS 2 . 0 , tvOS 9 . 0 , * )
751751 func test_PersonNameComponents_JSON( ) {
752- for (testLine, components) in personNameComponentsValues {
752+ for (testLine, components) in Self . personNameComponentsValues {
753753 expectRoundTripEqualityThroughJSON ( for: components, lineNumber: testLine)
754754 }
755755 }
756756
757757 @available ( macOS 10 . 11 , iOS 9 . 0 , watchOS 2 . 0 , tvOS 9 . 0 , * )
758758 func test_PersonNameComponents_Plist( ) {
759- for (testLine, components) in personNameComponentsValues {
759+ for (testLine, components) in Self . personNameComponentsValues {
760760 expectRoundTripEqualityThroughPlist ( for: components, lineNumber: testLine)
761761 }
762762 }
0 commit comments