@@ -434,7 +434,7 @@ class TestCodable : TestCodableSuper {
434
434
435
435
// MARK: - DateInterval
436
436
@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 ] = [
438
438
#line : DateInterval ( ) ,
439
439
#line : DateInterval ( start: Date . distantPast, end: Date ( ) ) ,
440
440
#line : DateInterval ( start: Date ( ) , end: Date . distantFuture) ,
@@ -443,14 +443,14 @@ class TestCodable : TestCodableSuper {
443
443
444
444
@available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
445
445
func test_DateInterval_JSON( ) {
446
- for (testLine, interval) in dateIntervalValues {
446
+ for (testLine, interval) in Self . dateIntervalValues {
447
447
expectRoundTripEqualityThroughJSON ( for: interval, lineNumber: testLine)
448
448
}
449
449
}
450
450
451
451
@available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
452
452
func test_DateInterval_Plist( ) {
453
- for (testLine, interval) in dateIntervalValues {
453
+ for (testLine, interval) in Self . dateIntervalValues {
454
454
expectRoundTripEqualityThroughPlist ( for: interval, lineNumber: testLine)
455
455
}
456
456
}
@@ -641,15 +641,15 @@ class TestCodable : TestCodableSuper {
641
641
642
642
// MARK: - Measurement
643
643
@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 ] = [
645
645
#line : UnitAcceleration . metersPerSecondSquared,
646
646
#line : UnitMass . kilograms,
647
647
#line : UnitLength . miles
648
648
]
649
649
650
650
@available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
651
651
func test_Measurement_JSON( ) {
652
- for (testLine, unit) in unitValues {
652
+ for (testLine, unit) in Self . unitValues {
653
653
// FIXME: <rdar://problem/49026133>
654
654
// Terminating due to uncaught exception NSInvalidArgumentException:
655
655
// *** You must override baseUnit in your class NSDimension to define its base unit.
@@ -660,7 +660,7 @@ class TestCodable : TestCodableSuper {
660
660
661
661
@available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
662
662
func test_Measurement_Plist( ) {
663
- for (testLine, unit) in unitValues {
663
+ for (testLine, unit) in Self . unitValues {
664
664
// FIXME: <rdar://problem/49026133>
665
665
// Terminating due to uncaught exception NSInvalidArgumentException:
666
666
// *** You must override baseUnit in your class NSDimension to define its base unit.
@@ -741,22 +741,22 @@ class TestCodable : TestCodableSuper {
741
741
742
742
// MARK: - PersonNameComponents
743
743
@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 ] = [
745
745
#line : makePersonNameComponents ( givenName: " John " , familyName: " Appleseed " ) ,
746
746
#line : makePersonNameComponents ( givenName: " John " , familyName: " Appleseed " , nickname: " Johnny " ) ,
747
747
#line : makePersonNameComponents ( namePrefix: " Dr. " , givenName: " Jane " , middleName: " A. " , familyName: " Appleseed " , nameSuffix: " Esq. " , nickname: " Janie " )
748
748
]
749
749
750
750
@available ( macOS 10 . 11 , iOS 9 . 0 , watchOS 2 . 0 , tvOS 9 . 0 , * )
751
751
func test_PersonNameComponents_JSON( ) {
752
- for (testLine, components) in personNameComponentsValues {
752
+ for (testLine, components) in Self . personNameComponentsValues {
753
753
expectRoundTripEqualityThroughJSON ( for: components, lineNumber: testLine)
754
754
}
755
755
}
756
756
757
757
@available ( macOS 10 . 11 , iOS 9 . 0 , watchOS 2 . 0 , tvOS 9 . 0 , * )
758
758
func test_PersonNameComponents_Plist( ) {
759
- for (testLine, components) in personNameComponentsValues {
759
+ for (testLine, components) in Self . personNameComponentsValues {
760
760
expectRoundTripEqualityThroughPlist ( for: components, lineNumber: testLine)
761
761
}
762
762
}
0 commit comments