Skip to content

Commit

Permalink
Add a list of tests to be run on Linux (see #13)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoul committed Oct 24, 2018
1 parent 87baf59 commit 01a7021
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
51 changes: 51 additions & 0 deletions GenericJSONTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import XCTest

extension CodingTests {
static let __allTests = [
("testDebugDescriptions", testDebugDescriptions),
("testDecoding", testDecoding),
("testDecodingBool", testDecodingBool),
("testEmptyCollectionDecoding", testEmptyCollectionDecoding),
("testEncoding", testEncoding),
("testFragmentEncoding", testFragmentEncoding),
]
}

extension EqualityTests {
static let __allTests = [
("testEquality", testEquality),
]
}

extension InitializationTests {
static let __allTests = [
("testInitialization", testInitialization),
("testInitializationFromCodable", testInitializationFromCodable),
("testUnknownTypeInitialization", testUnknownTypeInitialization),
]
}

extension QueryingTests {
static let __allTests = [
("testArraySubscripting", testArraySubscripting),
("testArrayValue", testArrayValue),
("testBoolValue", testBoolValue),
("testFloatValue", testFloatValue),
("testNullValue", testNullValue),
("testObjectValue", testObjectValue),
("testStringSubscripting", testStringSubscripting),
("testStringSubscriptingSugar", testStringSubscriptingSugar),
("testStringValue", testStringValue),
]
}

#if !os(macOS)
public func __allTests() -> [XCTestCaseEntry] {
return [
testCase(CodingTests.__allTests),
testCase(EqualityTests.__allTests),
testCase(InitializationTests.__allTests),
testCase(QueryingTests.__allTests),
]
}
#endif
8 changes: 8 additions & 0 deletions LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest

import GenericJSONTests

var tests = [XCTestCaseEntry]()
tests += GenericJSONTests.__allTests()

XCTMain(tests)

0 comments on commit 01a7021

Please sign in to comment.