Skip to content

Commit 5373585

Browse files
committed
fix tests failed in swift 6
1 parent 155afdd commit 5373585

6 files changed

Lines changed: 31 additions & 31 deletions

File tree

Tests/MacroCodableKitTests/Annotations/AnnotationTests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ final class AnnotationTests: XCTestCase {
5454

5555
@Codable
5656
struct DoubleStringExample {
57-
@DefaultValue(EmptyString)
58-
@ValueStrategy(AnnotationTests.DoubleStringStrategy)
57+
@DefaultValue(EmptyString.self)
58+
@ValueStrategy(AnnotationTests.DoubleStringStrategy.self)
5959
let string1: String
6060

61-
@DefaultValue(EmptyString)
62-
@ValueStrategy(AnnotationTests.DoubleStringStrategy)
61+
@DefaultValue(EmptyString.self)
62+
@ValueStrategy(AnnotationTests.DoubleStringStrategy.self)
6363
let string2: String
6464
}
6565

@@ -102,12 +102,12 @@ final class AnnotationTests: XCTestCase {
102102
let value: String
103103
}
104104

105-
@DefaultValue(AnnotationTests.Nested123DefaultValueProvider)
106-
@ValueStrategy(AnnotationTests.NestedDoubleStringStrategy)
105+
@DefaultValue(AnnotationTests.Nested123DefaultValueProvider.self)
106+
@ValueStrategy(AnnotationTests.NestedDoubleStringStrategy.self)
107107
let n1: Nested
108108

109-
@DefaultValue(AnnotationTests.Nested123DefaultValueProvider)
110-
@ValueStrategy(AnnotationTests.NestedDoubleStringStrategy)
109+
@DefaultValue(AnnotationTests.Nested123DefaultValueProvider.self)
110+
@ValueStrategy(AnnotationTests.NestedDoubleStringStrategy.self)
111111
let n2: Nested
112112
}
113113

@@ -124,10 +124,10 @@ final class AnnotationTests: XCTestCase {
124124

125125
@Codable
126126
struct TwiceExample: Equatable {
127-
@CustomCoding(Twice)
127+
@CustomCoding(Twice.self)
128128
var int: Int
129129

130-
@CustomCoding(Twice)
130+
@CustomCoding(Twice.self)
131131
var string: String
132132
}
133133

Tests/MacroCodableKitTests/Annotations/Base64StrategyTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import XCTest
1111
final class Base64StrategyTests: XCTestCase {
1212
@Codable
1313
struct Base64Struct {
14-
@ValueStrategy(Base64Data)
14+
@ValueStrategy(Base64Data.self)
1515
let data: Data
1616
}
1717

Tests/MacroCodableKitTests/Annotations/DateValueStrategyTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import XCTest
1212
final class DateValueStrategyTests: XCTestCase {
1313
@Codable
1414
struct IOS8601DefaultExample {
15-
@ValueStrategy(ISO8601Default)
15+
@ValueStrategy(ISO8601Default.self)
1616
let date: Date
1717
}
1818

@@ -29,7 +29,7 @@ final class DateValueStrategyTests: XCTestCase {
2929

3030
@Codable
3131
struct ISO8601FullDateExample {
32-
@ValueStrategy(ISO8601WithFullDate)
32+
@ValueStrategy(ISO8601WithFullDate.self)
3333
let date: Date
3434
}
3535

@@ -44,7 +44,7 @@ final class DateValueStrategyTests: XCTestCase {
4444

4545
@Codable
4646
struct ISO8601FractionalSecondsExample {
47-
@ValueStrategy(ISO8601WithFractionalSeconds)
47+
@ValueStrategy(ISO8601WithFractionalSeconds.self)
4848
let date: Date
4949
}
5050

@@ -59,7 +59,7 @@ final class DateValueStrategyTests: XCTestCase {
5959

6060
@Codable
6161
struct RFC2822DateExample {
62-
@ValueStrategy(RFC2822Date)
62+
@ValueStrategy(RFC2822Date.self)
6363
let date: Date
6464
}
6565

@@ -75,7 +75,7 @@ final class DateValueStrategyTests: XCTestCase {
7575

7676
@Codable
7777
struct RFC3339DateExample {
78-
@ValueStrategy(RFC3339Date)
78+
@ValueStrategy(RFC3339Date.self)
7979
let date: Date
8080
}
8181

@@ -90,7 +90,7 @@ final class DateValueStrategyTests: XCTestCase {
9090

9191
@Codable
9292
struct YearMonthDayDateExample {
93-
@ValueStrategy(YearMonthDayDate)
93+
@ValueStrategy(YearMonthDayDate.self)
9494
let date: Date
9595
}
9696

@@ -105,7 +105,7 @@ final class DateValueStrategyTests: XCTestCase {
105105

106106
@Codable
107107
struct TimestampedDateExample {
108-
@ValueStrategy(TimestampedDate)
108+
@ValueStrategy(TimestampedDate.self)
109109
let date: Date
110110
}
111111

@@ -129,7 +129,7 @@ final class DateValueStrategyTests: XCTestCase {
129129

130130
@Codable
131131
struct TimestampedDateOptionalExample {
132-
@ValueStrategy(TimestampedDate)
132+
@ValueStrategy(TimestampedDate.self)
133133
let date: Date?
134134
}
135135

Tests/MacroCodableKitTests/Annotations/DefaultValueTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ final class DefaultValueTests: XCTestCase {
1313
struct DefaultValueBool {
1414
let boolean1: Bool
1515

16-
@DefaultValue(BoolFalse)
16+
@DefaultValue(BoolFalse.self)
1717
let boolean2: Bool
1818

19-
@DefaultValue(BoolTrue)
19+
@DefaultValue(BoolTrue.self)
2020
let boolean3: Bool
2121

22-
@DefaultValue(BoolTrue)
22+
@DefaultValue(BoolTrue.self)
2323
let boolean4: Bool?
2424

2525
let boolean5: Bool?
@@ -29,10 +29,10 @@ final class DefaultValueTests: XCTestCase {
2929
struct DefaultValueInt {
3030
let int1: Int
3131

32-
@DefaultValue(IntZero)
32+
@DefaultValue(IntZero.self)
3333
let int2: Int
3434

35-
@DefaultValue(IntZero)
35+
@DefaultValue(IntZero.self)
3636
let int3: Int?
3737

3838
let int4: Int?
@@ -42,10 +42,10 @@ final class DefaultValueTests: XCTestCase {
4242
struct DefaultValueDouble {
4343
let double1: Double
4444

45-
@DefaultValue(DoubleZero)
45+
@DefaultValue(DoubleZero.self)
4646
let double2: Double
4747

48-
@DefaultValue(DoubleZero)
48+
@DefaultValue(DoubleZero.self)
4949
let double3: Double?
5050

5151
let double4: Double?

Tests/MacroCodableKitTests/Annotations/SafeCodingArrayTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ final class SafeCodingArrayTests: XCTestCase {
1313
struct SafeCodingArray1: Equatable {
1414
let strings: [String]
1515

16-
@CustomCoding(SafeDecoding)
16+
@CustomCoding(SafeDecoding.self)
1717
let safeStrings: [String]
1818
}
1919

2020
@Codable
2121
struct SafeCodingArray2: Equatable {
22-
@CustomCoding(SafeDecoding)
22+
@CustomCoding(SafeDecoding.self)
2323
let safeStrings: [String]?
2424
}
2525

Tests/MacroCodableKitTests/Annotations/SafeCodingDictionaryTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ final class SafeCodingDictionaryTests: XCTestCase {
1313
struct SafeCodingDictionary1: Equatable {
1414
let intByString: [String: Int]
1515

16-
@CustomCoding(SafeDecoding)
16+
@CustomCoding(SafeDecoding.self)
1717
let safeIntByString: [String: Int]
1818
}
1919

2020
@Codable
2121
struct SafeCodingDictionary2 {
2222
let stringByInt: [Int: String]
2323

24-
@CustomCoding(SafeDecoding)
24+
@CustomCoding(SafeDecoding.self)
2525
let safeStringByInt: [Int: String]
2626
}
2727

2828
@Codable
2929
struct SafeCodingDictionary3 {
3030
let intByString: [String: Int]
3131

32-
@CustomCoding(SafeDecoding)
32+
@CustomCoding(SafeDecoding.self)
3333
let safeIntByString: [String: Int]?
3434
}
3535

0 commit comments

Comments
 (0)