Skip to content

Commit 15f929a

Browse files
committed
expose tests for spm
1 parent 4d2483d commit 15f929a

14 files changed

+127
-0
lines changed

Tests/KakaJSONTests/JSON_To_Model/JTM_01_Basic.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,18 @@ class JTM_01_Basic: XCTestCase {
284284
XCTAssert(student.age == age)
285285
XCTAssert(student.score == score)
286286
}
287+
288+
static var allTests = [
289+
"testGeneric": testGeneric,
290+
"testAny": testAny,
291+
"testJSONString": testJSONString,
292+
"testJSONData": testJSONData,
293+
"testNSNull": testNSNull,
294+
"testLet": testLet,
295+
"testClass": testClass,
296+
"testNSObjectClass": testNSObjectClass,
297+
"testConvert": testConvert,
298+
"testCallback1": testCallback1,
299+
"testCallback2": testCallback2
300+
]
287301
}

Tests/KakaJSONTests/JSON_To_Model/JTM_02_DataType.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,4 +621,25 @@ class JTM_02_DataType: XCTestCase {
621621
XCTAssert(person.dict3?[k] as? Int == v)
622622
}
623623
}
624+
625+
static var allTests = [
626+
"testInt": testInt,
627+
"testFloat": testFloat,
628+
"testDouble": testDouble,
629+
"testCGFloat": testCGFloat,
630+
"testBool": testBool,
631+
"testString": testString,
632+
"testDecimal": testDecimal,
633+
"testDecimalNumber": testDecimalNumber,
634+
"testNumber": testNumber,
635+
"testOptional": testOptional,
636+
"testURL": testURL,
637+
"testData": testData,
638+
"testDate": testDate,
639+
"testEnum1": testEnum1,
640+
"testEnum2": testEnum2,
641+
"testArray": testArray,
642+
"testSet": testSet,
643+
"testDictionary": testDictionary
644+
]
624645
}

Tests/KakaJSONTests/JSON_To_Model/JTM_03_NestedModel.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,13 @@ class JTM_03_NestedModel: XCTestCase {
273273
XCTAssert(book?.name == bookName)
274274
XCTAssert(book?.price == bookPrice)
275275
}
276+
277+
static var allTests = [
278+
"testNormal": testNormal,
279+
"testDefaultValue": testDefaultValue,
280+
"testRecursive": testRecursive,
281+
"testGeneric": testGeneric,
282+
"testOptional": testOptional,
283+
"testSet": testSet
284+
]
276285
}

Tests/KakaJSONTests/JSON_To_Model/JTM_04_ModelArray.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,12 @@ class JTM_04_ModelArray: XCTestCase {
8787
XCTAssert(cars[2].name == tuples[2].name)
8888
XCTAssert(cars[2].price == tuples[2].price)
8989
}
90+
91+
static var allTests = [
92+
"testArray": testArray,
93+
"testNSArray": testNSArray,
94+
"testNSMutableArray": testNSMutableArray,
95+
"testSet": testSet,
96+
"testJSONString": testJSONString
97+
]
9098
}

Tests/KakaJSONTests/JSON_To_Model/JTM_05_KeyMapping.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,4 +492,20 @@ class JTM_05_KeyMapping: XCTestCase {
492492
XCTAssert(car.maxSpeed == max_speed)
493493
XCTAssert(car.name == name)
494494
}
495+
496+
static var allTests = [
497+
"testSimple": testSimple,
498+
"testCamelToUnderline": testCamelToUnderline,
499+
"testUnderlineToCamel": testUnderlineToCamel,
500+
"testClass1": testClass1,
501+
"testClass2": testClass2,
502+
"testClass3": testClass3,
503+
"testComplex": testComplex,
504+
"testComplex_JSONKeyWithDot": testComplex_JSONKeyWithDot,
505+
"testComplex_JSONKeyWithDot_bestMatch": testComplex_JSONKeyWithDot_bestMatch,
506+
"testConfig1": testConfig1,
507+
"testConfig2": testConfig2,
508+
"testConfig3": testConfig3,
509+
"testConfig4": testConfig4
510+
]
495511
}

Tests/KakaJSONTests/JSON_To_Model/JTM_06_CustomValue.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,12 @@ class JTM_06_CustomValue: XCTestCase {
184184
XCTAssert(student.age == 15)
185185
XCTAssert(student.name == "kj_Jack")
186186
}
187+
188+
static var allTests = [
189+
"testDate": testDate,
190+
"testAny": testAny,
191+
"testAnyArray": testAnyArray,
192+
"testOther1": testOther1,
193+
"testOther2": testOther2
194+
]
187195
}

Tests/KakaJSONTests/JSON_To_Model/JTM_07_DynamicModel.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,8 @@ class JTM_07_DynamicModel: XCTestCase {
114114
XCTAssert(food1?.name == books[1].name)
115115
XCTAssert(food1?.price == books[1].price)
116116
}
117+
118+
static var allTests = [
119+
"test": test
120+
]
117121
}

Tests/KakaJSONTests/Model_To_JSON/MTJ_01_Basic.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,11 @@ class MTJ_01_Basic: XCTestCase {
168168

169169
checkModelToJSon(Student.self)
170170
}
171+
172+
static var allTests = [
173+
"testNormal": testNormal,
174+
"testOptional": testOptional,
175+
"testEnum1": testEnum1,
176+
"testEnum2": testEnum2
177+
]
171178
}

Tests/KakaJSONTests/Model_To_JSON/MTJ_02_NestedModel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,9 @@ class MTJ_02_NestedModel: XCTestCase {
135135
XCTAssert(jsonString.contains("666.6") == true)
136136
XCTAssert(jsonString.contains("Fast C++") == true)
137137
}
138+
139+
static var allTests = [
140+
"test": test,
141+
"testAny": testAny
142+
]
138143
}

Tests/KakaJSONTests/Model_To_JSON/MTJ_03_ModelArray.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,9 @@ class MTJ_03_ModelArray: XCTestCase {
8585
XCTAssert(jsonString.contains("Bently") == true)
8686
XCTAssert(jsonString.contains("300") == true)
8787
}
88+
89+
static var allTests = [
90+
"testArray": testArray,
91+
"testSet": testSet
92+
]
8893
}

0 commit comments

Comments
 (0)