Use auto-detected tests on Linux

This commit is contained in:
Simon Edelmann 2020-02-29 01:10:57 +01:00
parent 65aa8e34cc
commit a04666da60
7 changed files with 1 additions and 55 deletions

View File

@ -92,11 +92,4 @@ final class CreateTests: ApplicationXCTestCase {
XCTAssertNotEqual(res.status, .ok)
}
}
static var allTests = [
("testCreateWithValidData", testCreateWithValidData),
("testCreateWithoutData", testCreateWithoutData),
("testCreateNonCreatableWithValidData", testCreateNonCreatableWithValidData),
("testCreateWithInvalidData", testCreateWithInvalidData),
]
}

View File

@ -40,9 +40,4 @@ final class DeleteTests: ApplicationXCTestCase {
}
}
}
static var allTests = [
("testDeleteWithValidId", testDeleteWithValidId),
("testDeleteWithInvalidId", testDeleteWithInvalidId),
]
}

View File

@ -30,9 +30,4 @@ final class IndexAllTests: ApplicationXCTestCase {
}
}
}
static var allTests = [
("testEmptyIndexAll", testEmptyIndexAll),
("testIndexAllContainingAllElements", testIndexAllContainingAllElements),
]
}

View File

@ -45,10 +45,4 @@ final class IndexTests: ApplicationXCTestCase {
XCTAssertNotEqual(res.status, .ok)
}
}
static var allTests = [
("testIndexWithoutID", testIndexWithoutID),
("testIndexForGivenID", testIndexForGivenID),
("testIndexForFakeID", testIndexForFakeID),
]
}

View File

@ -91,12 +91,4 @@ final class ReplaceTests: ApplicationXCTestCase {
}
}
}
static var allTests = [
("testReplaceForNonExistingObject", testReplaceForNonExistingObject),
("testReplaceNonReplaceableForNonExistingObject", testReplaceNonReplaceableForNonExistingObject),
("testReplaceWithValidData", testReplaceWithValidData),
("testReplaceNonReplaceableWithValidData", testReplaceNonReplaceableWithValidData),
("testReplaceWithInvalidData", testReplaceWithInvalidData),
]
}

View File

@ -1,13 +0,0 @@
import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(RoutingTests.allTests),
testCase(IndexAllTests.allTests),
testCase(IndexTests.allTests),
testCase(CreateTests.allTests),
testCase(ReplaceTests.allTests),
]
}
#endif

View File

@ -1,11 +1 @@
import XCTest
import CrudAPITests
var tests = [XCTestCaseEntry]()
tests += RoutingTests.allTests()
tests += IndexAllTests.allTests()
tests += IndexTests.allTests()
tests += CreateTests.allTests()
tests += ReplaceTests.allTests()
XCTMain(tests)
fatalError("Running tests like this is unsupported. Run the tests again by using `swift test --enable-test-discovery`")