Skip to content

Commit

Permalink
Use cauterize in tests to silence warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
interstateone committed Oct 3, 2019
1 parent 22dc57c commit 3a94285
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/XcodesKitTests/XcodesKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ final class XcodesKitTests: XCTestCase {
XCTAssertEqual(value, Path.applicationSupport.join("com.robotsandpencils.xcodes").join("Xcode-0.0.0.xip").url)
XCTAssertNil(xcodeDownloadURL)
}
.cauterize()
}

func test_DownloadOrUseExistingArchive_DownloadsArchive() {
Expand All @@ -73,6 +74,7 @@ final class XcodesKitTests: XCTestCase {
XCTAssertEqual(value, Path.applicationSupport.join("com.robotsandpencils.xcodes").join("Xcode-0.0.0.xip").url)
XCTAssertEqual(xcodeDownloadURL, URL(string: "https://apple.com/xcode.xip")!)
}
.cauterize()
}

func test_InstallArchivedXcode_SecurityAssessmentFails_Throws() {
Expand Down Expand Up @@ -111,6 +113,7 @@ final class XcodesKitTests: XCTestCase {
let xipURL = URL(fileURLWithPath: "/Xcode-0.0.0.xip")
installer.installArchivedXcode(xcode, at: xipURL, archiveTrashed: { _ in }, passwordInput: { Promise.value("") })
.ensure { XCTAssertEqual(trashedItemAtURL, xipURL) }
.cauterize()
}

func test_UninstallXcode_TrashesXcode() {
Expand All @@ -123,6 +126,7 @@ final class XcodesKitTests: XCTestCase {
let installedXcode = InstalledXcode(path: Path("/Applications/Xcode-0.0.0.app")!)!
installer.uninstallXcode(installedXcode)
.ensure { XCTAssertEqual(trashedItemAtURL, installedXcode.path.url) }
.cauterize()
}

func test_VerifySecurityAssessment_Fails() {
Expand All @@ -131,6 +135,7 @@ final class XcodesKitTests: XCTestCase {
let installedXcode = InstalledXcode(path: Path("/Applications/Xcode-0.0.0.app")!)!
installer.verifySecurityAssessment(of: installedXcode)
.tap { result in XCTAssertFalse(result.isFulfilled) }
.cauterize()
}

func test_VerifySecurityAssessment_Succeeds() {
Expand All @@ -139,6 +144,7 @@ final class XcodesKitTests: XCTestCase {
let installedXcode = InstalledXcode(path: Path("/Applications/Xcode-0.0.0.app")!)!
installer.verifySecurityAssessment(of: installedXcode)
.tap { result in XCTAssertTrue(result.isFulfilled) }
.cauterize()
}

func test_MigrateApplicationSupport_NoSupportFiles() {
Expand Down

0 comments on commit 3a94285

Please sign in to comment.