-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb107e
commit bcd9119
Showing
2 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
60 changes: 30 additions & 30 deletions
60
Tests/XCTestDynamicOverlayTests/XCTExpectFailureTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
//import XCTest | ||
// | ||
//#if canImport(ObjectiveC) | ||
// final class XCTExpectFailureTests: XCTestCase { | ||
// func testXCTDynamicOverlayWithBlockShouldFail() async throws { | ||
// MyXCTExpectFailure("This is expected to pass.", strict: false) { | ||
// XCTAssertEqual(42, 42) | ||
// } | ||
// | ||
// MyXCTExpectFailure("This is expected to pass.", strict: true) { | ||
// XCTAssertEqual(42, 1729) | ||
// } issueMatcher: { | ||
// $0.compactDescription == #"XCTAssertEqual failed: ("42") is not equal to ("1729")"# | ||
// } | ||
// | ||
// if ProcessInfo.processInfo.environment["TEST_FAILURE"] != nil { | ||
// MyXCTExpectFailure("This is expected to fail!", strict: true) { | ||
// XCTAssertEqual(42, 42) | ||
// } | ||
// } | ||
// } | ||
// | ||
// func testXCTDynamicOverlayShouldFail() async throws { | ||
// MyXCTExpectFailure("This is expected to pass.", strict: true) { | ||
// $0.compactDescription == #"XCTAssertEqual failed: ("42") is not equal to ("1729")"# | ||
// } | ||
// XCTAssertEqual(42, 1729) | ||
// } | ||
// } | ||
//#endif | ||
import XCTest | ||
|
||
#if canImport(ObjectiveC) | ||
final class XCTExpectFailureTests: XCTestCase { | ||
func testXCTDynamicOverlayWithBlockShouldFail() async throws { | ||
MyXCTExpectFailure("This is expected to pass.", strict: false) { | ||
XCTAssertEqual(42, 42) | ||
} | ||
|
||
MyXCTExpectFailure("This is expected to pass.", strict: true) { | ||
XCTAssertEqual(42, 1729) | ||
} issueMatcher: { | ||
$0.compactDescription == #"XCTAssertEqual failed: ("42") is not equal to ("1729")"# | ||
} | ||
|
||
if ProcessInfo.processInfo.environment["TEST_FAILURE"] != nil { | ||
MyXCTExpectFailure("This is expected to fail!", strict: true) { | ||
XCTAssertEqual(42, 42) | ||
} | ||
} | ||
} | ||
|
||
func testXCTDynamicOverlayShouldFail() async throws { | ||
MyXCTExpectFailure("This is expected to pass.", strict: true) { | ||
$0.compactDescription == #"XCTAssertEqual failed: ("42") is not equal to ("1729")"# | ||
} | ||
XCTAssertEqual(42, 1729) | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
//import XCTest | ||
// | ||
//final class XCTFailTests: XCTestCase { | ||
// func testXCTFailShouldFail() async throws { | ||
// if ProcessInfo.processInfo.environment["TEST_FAILURE"] != nil { | ||
// MyXCTFail("This is expected to fail!") | ||
// } | ||
// } | ||
//} | ||
import XCTest | ||
|
||
final class XCTFailTests: XCTestCase { | ||
func testXCTFailShouldFail() async throws { | ||
if ProcessInfo.processInfo.environment["TEST_FAILURE"] != nil { | ||
MyXCTFail("This is expected to fail!") | ||
} | ||
} | ||
} |