Skip to content

Updated tests for SE-0036 and SE-0066 #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tests/Build/DescribeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class DescribeTests: XCTestCase {
}

extension DescribeTests {
static var allTests: [(String, DescribeTests -> () throws -> Void)] {
static var allTests: [(String, (DescribeTests) -> () throws -> Void)] {
return [
("testDescribingNoModulesThrows", testDescribingNoModulesThrows),
]
Expand Down
2 changes: 1 addition & 1 deletion Tests/Build/PackageVersionDataTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ final class PackageVersionDataTests: XCTestCase {
}

extension PackageVersionDataTests {
static var allTests: [(String, PackageVersionDataTests -> () throws -> Void)] {
static var allTests: [(String, (PackageVersionDataTests) -> () throws -> Void)] {
return [
("testPackageVersionData", testPackageVersionData),
("testPackageEmptyVersionData", testPackageEmptyVersionData),
Expand Down
2 changes: 1 addition & 1 deletion Tests/Build/PkgConfigParserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class PkgConfigParserTests: XCTestCase {


extension PkgConfigParserTests {
static var allTests : [(String, PkgConfigParserTests -> () throws -> Void)] {
static var allTests : [(String, (PkgConfigParserTests) -> () throws -> Void)] {
return [
("testGTK3PCFile", testGTK3PCFile),
]
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/ClangModuleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class TestClangModulesTestCase: XCTestCase {


extension TestClangModulesTestCase {
static var allTests : [(String, TestClangModulesTestCase -> () throws -> Void)] {
static var allTests : [(String, (TestClangModulesTestCase) -> () throws -> Void)] {
return [
("testSingleModuleFlatCLibrary", testSingleModuleFlatCLibrary),
("testSingleModuleCLibraryInSources", testSingleModuleCLibraryInSources),
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/ModuleMapTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ModuleMapsTestCase: XCTestCase {


extension ModuleMapsTestCase {
static var allTests : [(String, ModuleMapsTestCase -> () throws -> Void)] {
static var allTests : [(String, (ModuleMapsTestCase) -> () throws -> Void)] {
return [
("testDirectDependency", testDirectDependency),
("testTransitiveDependency", testTransitiveDependency),
Expand Down
8 changes: 4 additions & 4 deletions Tests/Functional/ValidLayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ extension ValidLayoutsTestCase {


extension DependencyResolutionTestCase {
static var allTests : [(String, DependencyResolutionTestCase -> () throws -> Void)] {
static var allTests : [(String, (DependencyResolutionTestCase) -> () throws -> Void)] {
return [
("testInternalSimple", testInternalSimple),
("testInternalComplex", testInternalComplex),
Expand All @@ -144,7 +144,7 @@ extension DependencyResolutionTestCase {
}

extension InvalidLayoutsTestCase {
static var allTests : [(String, InvalidLayoutsTestCase -> () throws -> Void)] {
static var allTests : [(String, (InvalidLayoutsTestCase) -> () throws -> Void)] {
return [
("testMultipleRoots", testMultipleRoots),
("testInvalidLayout1", testInvalidLayout1),
Expand All @@ -157,7 +157,7 @@ extension InvalidLayoutsTestCase {
}

extension MiscellaneousTestCase {
static var allTests : [(String, MiscellaneousTestCase -> () throws -> Void)] {
static var allTests : [(String, (MiscellaneousTestCase) -> () throws -> Void)] {
return [
("testPrintsSelectedDependencyVersion", testPrintsSelectedDependencyVersion),
("testPackageWithNoSources", testPackageWithNoSources),
Expand Down Expand Up @@ -189,7 +189,7 @@ extension MiscellaneousTestCase {
}

extension ValidLayoutsTestCase {
static var allTests : [(String, ValidLayoutsTestCase -> () throws -> Void)] {
static var allTests : [(String, (ValidLayoutsTestCase) -> () throws -> Void)] {
return [
("testSingleModuleLibrary", testSingleModuleLibrary),
("testSingleModuleExecutable", testSingleModuleExecutable),
Expand Down
6 changes: 3 additions & 3 deletions Tests/Get/RawCloneTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private func tryCloningRepoWithTag(_ tag: String?, shouldCrash: Bool) {


extension VersionGraphTests {
static var allTests : [(String, VersionGraphTests -> () throws -> Void)] {
static var allTests : [(String, (VersionGraphTests) -> () throws -> Void)] {
return [
("testNoGraph", testNoGraph),
("testOneDependency", testOneDependency),
Expand All @@ -87,7 +87,7 @@ extension VersionGraphTests {
}

extension GetTests {
static var allTests : [(String, GetTests -> () throws -> Void)] {
static var allTests : [(String, (GetTests) -> () throws -> Void)] {
return [
("testRawCloneDoesNotCrashIfManifestIsNotPresent", testRawCloneDoesNotCrashIfManifestIsNotPresent),
("testRangeConstrain", testRangeConstrain),
Expand All @@ -97,7 +97,7 @@ extension GetTests {
}

extension GitTests {
static var allTests : [(String, GitTests -> () throws -> Void)] {
static var allTests : [(String, (GitTests) -> () throws -> Void)] {
return [
("testHasVersion", testHasVersion),
("testHasNoVersion", testHasNoVersion),
Expand Down
6 changes: 3 additions & 3 deletions Tests/ManifestParser/TOMLTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TOMLTests: XCTestCase {


extension TOMLTests {
static var allTests : [(String, TOMLTests -> () throws -> Void)] {
static var allTests : [(String, (TOMLTests) -> () throws -> Void)] {
return [
("testLexer", testLexer),
("testParser", testParser),
Expand All @@ -119,15 +119,15 @@ extension TOMLTests {
}

extension ManifestTests {
static var allTests : [(String, ManifestTests -> () throws -> Void)] {
static var allTests : [(String, (ManifestTests) -> () throws -> Void)] {
return [
("testManifestLoading", testManifestLoading),
]
}
}

extension PackageTests {
static var allTests : [(String, PackageTests -> () throws -> Void)] {
static var allTests : [(String, (PackageTests) -> () throws -> Void)] {
return [
("testBasics", testBasics),
("testExclude", testExclude),
Expand Down
14 changes: 7 additions & 7 deletions Tests/OptionsParser/OptionParserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ enum Mode: String, Argument {
init?(argument: String, pop: () -> String?) throws {
switch argument {
case "--A":
self = A
self = .A
case "--B":
self = B
self = .B
case "--C":
self = C
self = .C
default:
return nil
}
Expand All @@ -135,15 +135,15 @@ enum Flag: Argument, Equatable {
init?(argument: String, pop: () -> String?) throws {
switch argument {
case "--D":
self = D
self = .D
case "--E":
self = E
self = .E
case "--F":
guard let str = pop() else { throw Error.ExpectedAssociatedValue("") }
self = F(str)
self = .F(str)
case "--G":
guard let str = pop(), int = Int(str) else { throw Error.ExpectedAssociatedValue("") }
self = G(int)
self = .G(int)
case "-H":
self = .H
case "-I":
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageDescription/PackageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PackageTests: XCTestCase {
}

extension PackageTests {
static var allTests : [(String, PackageTests -> () throws -> Void)] {
static var allTests : [(String, (PackageTests) -> () throws -> Void)] {
return [
("testMatchDependencyWithPreReleaseVersion", testMatchDependencyWithPreReleaseVersion),
]
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageDescription/VersionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class VersionTests: XCTestCase {


extension VersionTests {
static var allTests : [(String, VersionTests -> () throws -> Void)] {
static var allTests : [(String, (VersionTests) -> () throws -> Void)] {
return [
("testEquality", testEquality),
("testNegativeValuesBecomeZero", testNegativeValuesBecomeZero),
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageType/PackageNameTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PackageTests: XCTestCase {


extension PackageTests {
static var allTests : [(String, PackageTests -> () throws -> Void)] {
static var allTests : [(String, (PackageTests) -> () throws -> Void)] {
return [
("testUrlEndsInDotGit1", testUrlEndsInDotGit1),
("testUrlEndsInDotGit2", testUrlEndsInDotGit2),
Expand Down
6 changes: 3 additions & 3 deletions Tests/Transmute/XCTestManifests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

extension ModuleDependencyTests {
static var allTests : [(String, ModuleDependencyTests -> () throws -> Void)] {
static var allTests : [(String, (ModuleDependencyTests) -> () throws -> Void)] {
return [
("test1", test1),
("test2", test2),
Expand All @@ -22,7 +22,7 @@ extension ModuleDependencyTests {
}

extension PrimitiveResolutionTests {
static var allTests : [(String, PrimitiveResolutionTests -> () throws -> Void)] {
static var allTests : [(String, (PrimitiveResolutionTests) -> () throws -> Void)] {
return [
("testResolvesSingleSwiftModule", testResolvesSingleSwiftModule),
("testResolvesSystemModulePackage", testResolvesSystemModulePackage),
Expand All @@ -32,7 +32,7 @@ extension PrimitiveResolutionTests {
}

extension ValidSourcesTests {
static var allTests : [(String, ValidSourcesTests -> () throws -> Void)] {
static var allTests : [(String, (ValidSourcesTests) -> () throws -> Void)] {
return [
("testDotFilesAreIgnored", testDotFilesAreIgnored),
]
Expand Down
2 changes: 1 addition & 1 deletion Tests/Utility/GitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class GitUtilityTests: XCTestCase {
}

extension GitUtilityTests {
static var allTests : [(String, GitUtilityTests -> () throws -> Void)] {
static var allTests : [(String, (GitUtilityTests) -> () throws -> Void)] {
return [
("testGitVersion", testGitVersion),
("testHeadSha", testHeadSha),
Expand Down
24 changes: 12 additions & 12 deletions Tests/Utility/XCTestManifests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

extension ByteStringTests {
static var allTests : [(String, ByteStringTests -> () throws -> Void)] {
static var allTests : [(String, (ByteStringTests) -> () throws -> Void)] {
return [
("testInitializers", testInitializers),
("testAccessors", testAccessors),
Expand All @@ -22,7 +22,7 @@ extension ByteStringTests {
}

extension CollectionTests {
static var allTests : [(String, CollectionTests -> () throws -> Void)] {
static var allTests : [(String, (CollectionTests) -> () throws -> Void)] {
return [
("testPick", testPick),
("testPartitionByType", testPartitionByType),
Expand All @@ -33,7 +33,7 @@ extension CollectionTests {
}

extension FileTests {
static var allTests : [(String, FileTests -> () throws -> Void)] {
static var allTests : [(String, (FileTests) -> () throws -> Void)] {
return [
("testOpenFile", testOpenFile),
("testOpenFileFail", testOpenFileFail),
Expand All @@ -45,15 +45,15 @@ extension FileTests {


extension RmtreeTests {
static var allTests : [(String, RmtreeTests -> () throws -> Void)] {
static var allTests : [(String, (RmtreeTests) -> () throws -> Void)] {
return [
("testDoesNotFollowSymlinks", testDoesNotFollowSymlinks),
]
}
}

extension OutputByteStreamTests {
static var allTests : [(String, OutputByteStreamTests -> () throws -> Void)] {
static var allTests : [(String, (OutputByteStreamTests) -> () throws -> Void)] {
return [
("testBasics", testBasics),
("testStreamOperator", testStreamOperator),
Expand All @@ -64,7 +64,7 @@ extension OutputByteStreamTests {
}

extension PathTests {
static var allTests : [(String, PathTests -> () throws -> Void)] {
static var allTests : [(String, (PathTests) -> () throws -> Void)] {
return [
("test", test),
("testPrecombined", testPrecombined),
Expand All @@ -78,7 +78,7 @@ extension PathTests {
}

extension WalkTests {
static var allTests : [(String, WalkTests -> () throws -> Void)] {
static var allTests : [(String, (WalkTests) -> () throws -> Void)] {
return [
("testNonRecursive", testNonRecursive),
("testRecursive", testRecursive),
Expand All @@ -89,7 +89,7 @@ extension WalkTests {
}

extension StatTests {
static var allTests : [(String, StatTests -> () throws -> Void)] {
static var allTests : [(String, (StatTests) -> () throws -> Void)] {
return [
("test_isdir", test_isdir),
("test_isfile", test_isfile),
Expand All @@ -100,7 +100,7 @@ extension StatTests {
}

extension RelativePathTests {
static var allTests : [(String, RelativePathTests -> () throws -> Void)] {
static var allTests : [(String, (RelativePathTests) -> () throws -> Void)] {
return [
("testAbsolute", testAbsolute),
("testRelative", testRelative),
Expand All @@ -112,7 +112,7 @@ extension RelativePathTests {
}

extension ShellTests {
static var allTests : [(String, ShellTests -> () throws -> Void)] {
static var allTests : [(String, (ShellTests) -> () throws -> Void)] {
return [
("testPopen", testPopen),
("testPopenWithBufferLargerThanThatAllocated", testPopenWithBufferLargerThanThatAllocated),
Expand All @@ -123,7 +123,7 @@ extension ShellTests {


extension StringTests {
static var allTests : [(String, StringTests -> () throws -> Void)] {
static var allTests : [(String, (StringTests) -> () throws -> Void)] {
return [
("testTrailingChomp", testTrailingChomp),
("testEmptyChomp", testEmptyChomp),
Expand All @@ -136,7 +136,7 @@ extension StringTests {
}

extension URLTests {
static var allTests : [(String, URLTests -> () throws -> Void)] {
static var allTests : [(String, (URLTests) -> () throws -> Void)] {
return [
("testSchema", testSchema),
]
Expand Down