@@ -10,6 +10,14 @@ class SortedArrayTests: XCTestCase {
1010 super. tearDown ( )
1111 }
1212
13+ func testLinuxTestSuiteIncludesAllTests( ) {
14+ #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
15+ let darwinTestCount = Int ( SortedArrayTests . defaultTestSuite ( ) . testCaseCount)
16+ let linuxTestCount = SortedArrayTests . allTests. count
17+ XCTAssertEqual ( linuxTestCount, darwinTestCount, " allTests (used for testing on Linux) is missing \( darwinTestCount - linuxTestCount) tests " )
18+ #endif
19+ }
20+
1321 func testInitUnsortedSorts( ) {
1422 let sut = SortedArray ( unsorted: [ 3 , 4 , 2 , 1 ] , areInIncreasingOrder: < )
1523 assertElementsEqual ( sut, [ 1 , 2 , 3 , 4 ] )
@@ -224,6 +232,7 @@ class SortedArrayTests: XCTestCase {
224232extension SortedArrayTests {
225233 static var allTests : [ ( String , ( SortedArrayTests ) -> ( ) throws -> Void ) ] {
226234 return [
235+ ( " testLinuxTestSuiteIncludesAllTests " , testLinuxTestSuiteIncludesAllTests) ,
227236 ( " testInitUnsortedSorts " , testInitUnsortedSorts) ,
228237 ( " testInitSortedDoesntResort " , testInitSortedDoesntResort) ,
229238 ( " testSortedArrayCanUseArbitraryComparisonPredicate " , testSortedArrayCanUseArbitraryComparisonPredicate) ,
0 commit comments