Skip to content

Commit 9a07ef4

Browse files
committed
Update syntax to Swift 4
1 parent 4c9df0a commit 9a07ef4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Tests/SortedArrayTests/SortedArrayTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ class SortedArrayTests: XCTestCase {
1212

1313
func testLinuxTestSuiteIncludesAllTests() {
1414
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
15-
let darwinTestCount = Int(SortedArrayTests.defaultTestSuite().testCaseCount)
15+
#if swift(>=4.0)
16+
let darwinTestCount = SortedArrayTests.defaultTestSuite.testCaseCount
17+
#else
18+
let darwinTestCount = Int(SortedArrayTests.defaultTestSuite().testCaseCount)
19+
#endif
1620
let linuxTestCount = SortedArrayTests.allTests.count
1721
XCTAssertEqual(linuxTestCount, darwinTestCount, "allTests (used for testing on Linux) is missing \(darwinTestCount - linuxTestCount) tests")
1822
#endif

0 commit comments

Comments
 (0)