Skip to content

Commit fe7a21c

Browse files
committed
1 parent ddfed10 commit fe7a21c

21 files changed

+27
-27
lines changed

Tests/Functional/TestDependencyResolution.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import func POSIX.popen
44

55
class DependencyResolutionTestCase: XCTestCase, XCTestCaseProvider {
66

7-
var allTests : [(String, () -> Void)] {
7+
var allTests : [(String, () throws -> Void)] {
88
return [
99
("testInternalSimple", testInternalSimple),
1010
("testInternalComplex", testInternalComplex),

Tests/Functional/TestInvalidLayouts.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import func POSIX.unlink
55

66
class InvalidLayoutsTestCase: XCTestCase, XCTestCaseProvider {
77

8-
var allTests : [(String, () -> Void)] {
8+
var allTests : [(String, () throws -> Void)] {
99
return [
1010
("testNoTargets", testNoTargets),
1111
("testMultipleRoots", testMultipleRoots),

Tests/Functional/TestMiscellaneous.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import struct sys.Path
1010

1111
class MiscellaneousTestCase: XCTestCase, XCTestCaseProvider {
1212

13-
var allTests : [(String, () -> Void)] {
13+
var allTests : [(String, () throws -> Void)] {
1414
return [
1515
("testPrintsSelectedDependencyVersion", testPrintsSelectedDependencyVersion),
1616
("testManifestExcludes1", testManifestExcludes1),

Tests/Functional/TestValidLayouts.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ extension ValidLayoutsTestCase {
118118
//MARK: Boilerplate
119119

120120
extension ValidLayoutsTestCase {
121-
var allTests : [(String, () -> Void)] {
121+
var allTests : [(String, () throws -> Void)] {
122122
return [
123123
("testSingleModuleLibrary", testSingleModuleLibrary),
124124
("testSingleModuleExecutable", testSingleModuleExecutable),

Tests/PackageDescription/PackageDescriptionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private func parseTOML(data: String) -> TOMLItem {
2424

2525
class PackageTests: XCTestCase, XCTestCaseProvider {
2626

27-
var allTests : [(String, () -> Void)] {
27+
var allTests : [(String, () throws -> Void)] {
2828
return [
2929
("testBasics", testBasics),
3030
("testExclude", testExclude),

Tests/XCTestCaseProvider/XCTestCaseProvider.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import XCTest
2424

2525
public protocol XCTestCaseProvider {
26-
var allTests : [(String, () -> Void)] { get }
26+
var allTests : [(String, () throws -> Void)] { get }
2727
}
2828

2929
public func XCTMain(testCases: [XCTestCaseProvider]) {
@@ -42,11 +42,11 @@
4242

4343
extension XCTestCaseProvider {
4444
private func assertContainsTest(name: String) {
45-
let contains = self.allTests.contains({ test in
45+
let contains = allTests.contains({ test in
4646
return test.0 == name
4747
})
4848

49-
XCTAssert(contains, "Test '\(name)' is missing from the allTests array")
49+
XCTAssert(contains, "Test '\(name)' is missing from the var allTests : [(String, () throws -> Void)] { array")
5050
}
5151
}
5252
#endif

Tests/dep/DependencyGraphTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import XCTestCaseProvider
1515

1616
class VersionGraphTests: XCTestCase, XCTestCaseProvider {
1717

18-
var allTests : [(String, () -> Void)] {
18+
var allTests : [(String, () throws -> Void)] {
1919
return [
2020
("testNoGraph", testNoGraph),
2121
("testOneDependency", testOneDependency),

Tests/dep/GetTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import struct sys.Path
1616

1717
class GetTests: XCTestCase, XCTestCaseProvider {
1818

19-
var allTests : [(String, () -> Void)] {
19+
var allTests : [(String, () throws -> Void)] {
2020
return [
2121
("testRawCloneDoesNotCrashIfManifestIsNotPresent", testRawCloneDoesNotCrashIfManifestIsNotPresent),
2222
("testRangeConstrain", testRangeConstrain),

Tests/dep/GitTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import func POSIX.popen
1616

1717
class GitTests: XCTestCase, XCTestCaseProvider {
1818

19-
var allTests : [(String, () -> Void)] {
19+
var allTests : [(String, () throws -> Void)] {
2020
return [
2121
("testHasVersion", testHasVersion),
2222
("testHasNoVersion", testHasNoVersion),

Tests/dep/ManifestTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import sys
1616

1717
class ManifestTests: XCTestCase, XCTestCaseProvider {
1818

19-
var allTests : [(String, () -> Void)] {
19+
var allTests : [(String, () throws -> Void)] {
2020
return [
2121
("testManifestLoading", testManifestLoading),
2222
]

Tests/dep/PackageTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import func POSIX.rename
1717

1818
class PackageTests: XCTestCase, XCTestCaseProvider {
1919

20-
var allTests : [(String, () -> Void)] {
20+
var allTests : [(String, () throws -> Void)] {
2121
return [
2222
("testInitializer", testInitializer),
2323
("testModuleTypes", testModuleTypes),

Tests/dep/TargetTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extension Target {
3131

3232
class TargetTests: XCTestCase, XCTestCaseProvider {
3333

34-
var allTests : [(String, () -> Void)] {
34+
var allTests : [(String, () throws -> Void)] {
3535
return [
3636
("test1", test1),
3737
("test2", test2),

Tests/dep/UidTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import XCTestCaseProvider
1414

1515
class ProjectTests: XCTestCase, XCTestCaseProvider {
1616

17-
var allTests : [(String, () -> Void)] {
17+
var allTests : [(String, () throws -> Void)] {
1818
return [
1919
("testUrlEndsInDotGit1", testUrlEndsInDotGit1),
2020
("testUrlEndsInDotGit2", testUrlEndsInDotGit2),

Tests/dep/VersionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import libc
1616

1717
class VersionTests: XCTestCase, XCTestCaseProvider {
1818

19-
var allTests : [(String, () -> Void)] {
19+
var allTests : [(String, () throws -> Void)] {
2020
return [
2121
("testEquality", testEquality),
2222
("testNegativeValuesBecomeZero", testNegativeValuesBecomeZero),

Tests/sys/FileTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import XCTestCaseProvider
1414

1515
class FileTests: XCTestCase, XCTestCaseProvider {
1616

17-
var allTests : [(String, () -> Void)] {
17+
var allTests : [(String, () throws -> Void)] {
1818
return [
1919
("testOpenFile", testOpenFile),
2020
("testOpenFileFail", testOpenFileFail),

Tests/sys/MiscTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import libc
1616

1717
class RmtreeTests: XCTestCase, XCTestCaseProvider {
1818

19-
var allTests : [(String, () -> Void)] {
19+
var allTests : [(String, () throws -> Void)] {
2020
return [
2121
("testDoesNotFollowSymlinks", testDoesNotFollowSymlinks),
2222
]

Tests/sys/PathTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import POSIX
1515

1616
class PathTests: XCTestCase, XCTestCaseProvider {
1717

18-
var allTests : [(String, () -> Void)] {
18+
var allTests : [(String, () throws -> Void)] {
1919
return [
2020
("test", test),
2121
("testPrecombined", testPrecombined),
@@ -93,7 +93,7 @@ class PathTests: XCTestCase, XCTestCaseProvider {
9393

9494
class WalkTests: XCTestCase, XCTestCaseProvider {
9595

96-
var allTests : [(String, () -> Void)] {
96+
var allTests : [(String, () throws -> Void)] {
9797
return [
9898
("testNonRecursive", testNonRecursive),
9999
("testRecursive", testRecursive),
@@ -178,7 +178,7 @@ class WalkTests: XCTestCase, XCTestCaseProvider {
178178

179179
class StatTests: XCTestCase, XCTestCaseProvider {
180180

181-
var allTests : [(String, () -> Void)] {
181+
var allTests : [(String, () throws -> Void)] {
182182
return [
183183
("test_isdir", test_isdir),
184184
("test_isfile", test_isfile),
@@ -229,7 +229,7 @@ class StatTests: XCTestCase, XCTestCaseProvider {
229229

230230
class RelativePathTests: XCTestCase, XCTestCaseProvider {
231231

232-
var allTests : [(String, () -> Void)] {
232+
var allTests : [(String, () throws -> Void)] {
233233
return [
234234
("testAbsolute", testAbsolute),
235235
("testRelative", testRelative),

Tests/sys/ResourcesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public var globalSymbolInNonMainBinary = 0
1616

1717
class ResourcesTests: XCTestCase, XCTestCaseProvider {
1818

19-
var allTests : [(String, () -> Void)] {
19+
var allTests : [(String, () throws -> Void)] {
2020
return [
2121
("testResources", testResources),
2222
]

Tests/sys/ShellTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import XCTestCaseProvider
1414

1515
class ShellTests: XCTestCase, XCTestCaseProvider {
1616

17-
var allTests : [(String, () -> Void)] {
17+
var allTests : [(String, () throws -> Void)] {
1818
return [
1919
("testPopen", testPopen),
2020
("testPopenWithBufferLargerThanThatAllocated", testPopenWithBufferLargerThanThatAllocated),

Tests/sys/StringTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import XCTestCaseProvider
1414

1515
class StringTests: XCTestCase, XCTestCaseProvider {
1616

17-
var allTests : [(String, () -> Void)] {
17+
var allTests : [(String, () throws -> Void)] {
1818
return [
1919
("testTrailingChomp", testTrailingChomp),
2020
("testEmptyChomp", testEmptyChomp),
@@ -57,7 +57,7 @@ class StringTests: XCTestCase, XCTestCaseProvider {
5757

5858
class URLTests: XCTestCase, XCTestCaseProvider {
5959

60-
var allTests : [(String, () -> Void)] {
60+
var allTests : [(String, () throws -> Void)] {
6161
return [
6262
("testSchema", testSchema),
6363
]

Tests/sys/TOMLTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private func parseTOML(data: String) -> TOMLItem {
3131

3232
class TOMLTests: XCTestCase, XCTestCaseProvider {
3333

34-
var allTests : [(String, () -> Void)] {
34+
var allTests : [(String, () throws -> Void)] {
3535
return [
3636
("testLexer", testLexer),
3737
("testParser", testParser),

0 commit comments

Comments
 (0)