Skip to content

Commit 01a7021

Browse files
committed
Add a list of tests to be run on Linux (see #13)
1 parent 87baf59 commit 01a7021

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import XCTest
2+
3+
extension CodingTests {
4+
static let __allTests = [
5+
("testDebugDescriptions", testDebugDescriptions),
6+
("testDecoding", testDecoding),
7+
("testDecodingBool", testDecodingBool),
8+
("testEmptyCollectionDecoding", testEmptyCollectionDecoding),
9+
("testEncoding", testEncoding),
10+
("testFragmentEncoding", testFragmentEncoding),
11+
]
12+
}
13+
14+
extension EqualityTests {
15+
static let __allTests = [
16+
("testEquality", testEquality),
17+
]
18+
}
19+
20+
extension InitializationTests {
21+
static let __allTests = [
22+
("testInitialization", testInitialization),
23+
("testInitializationFromCodable", testInitializationFromCodable),
24+
("testUnknownTypeInitialization", testUnknownTypeInitialization),
25+
]
26+
}
27+
28+
extension QueryingTests {
29+
static let __allTests = [
30+
("testArraySubscripting", testArraySubscripting),
31+
("testArrayValue", testArrayValue),
32+
("testBoolValue", testBoolValue),
33+
("testFloatValue", testFloatValue),
34+
("testNullValue", testNullValue),
35+
("testObjectValue", testObjectValue),
36+
("testStringSubscripting", testStringSubscripting),
37+
("testStringSubscriptingSugar", testStringSubscriptingSugar),
38+
("testStringValue", testStringValue),
39+
]
40+
}
41+
42+
#if !os(macOS)
43+
public func __allTests() -> [XCTestCaseEntry] {
44+
return [
45+
testCase(CodingTests.__allTests),
46+
testCase(EqualityTests.__allTests),
47+
testCase(InitializationTests.__allTests),
48+
testCase(QueryingTests.__allTests),
49+
]
50+
}
51+
#endif

LinuxMain.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import XCTest
2+
3+
import GenericJSONTests
4+
5+
var tests = [XCTestCaseEntry]()
6+
tests += GenericJSONTests.__allTests()
7+
8+
XCTMain(tests)

0 commit comments

Comments
 (0)