Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Jul 10, 2024
1 parent e1b2287 commit 703cc06
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions Tests/IssueReportingTests/IssueReportingTests_XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,38 @@ final class XCTestTests: XCTestCase {
func testTestContext() {
XCTAssertEqual(TestContext.current, .xcTest)
}

func testReportIssue_NoMessage() {
XCTExpectFailure {
reportIssue()
} issueMatcher: {
$0.compactDescription == "failed"

#if _runtime(_ObjC)
func testReportIssue_NoMessage() {
XCTExpectFailure {
reportIssue()
} issueMatcher: {
$0.compactDescription == "failed"
}
}
}

func testReportIssue_CustomMessage() {
XCTExpectFailure {
reportIssue("Something went wrong")
} issueMatcher: {
$0.compactDescription == "failed - Something went wrong"

func testReportIssue_CustomMessage() {
XCTExpectFailure {
reportIssue("Something went wrong")
} issueMatcher: {
$0.compactDescription == "failed - Something went wrong"
}
}
}

func testWithExpectedIssue() {
withExpectedIssue {
reportIssue("Something went wrong")

func testWithExpectedIssue() {
withExpectedIssue {
reportIssue("Something went wrong")
}
}
}

func testWithExpectedIssue_XCTFail() {
withExpectedIssue {
XCTFail()
func testWithExpectedIssue_XCTFail() {
withExpectedIssue {
XCTFail()
}
}
}

func testWithExpectedIssue_Throwing() {
withExpectedIssue { throw Failure() }
}
func testWithExpectedIssue_Throwing() {
withExpectedIssue { throw Failure() }
}
#endif
}

0 comments on commit 703cc06

Please sign in to comment.