Skip to content

Commit 41330ae

Browse files
authored
Remove "unconditional" messaging from Issue kind .unconditional. (#575)
1 parent c314907 commit 41330ae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Sources/Testing/Issues/Issue.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,10 @@ extension Issue.Kind: CustomStringConvertible {
171171
public var description: String {
172172
switch self {
173173
case .unconditional:
174-
"Unconditionally failed"
174+
// Although the failure is unconditional at the point it is recorded, the
175+
// code that recorded the issue may not be unconditionally executing, so
176+
// we shouldn't describe it as unconditional (we just don't know!)
177+
"Issue recorded"
175178
case let .expectationFailed(expectation):
176179
if let mismatchedErrorDescription = expectation.mismatchedErrorDescription {
177180
"Expectation failed: \(mismatchedErrorDescription)"
@@ -457,7 +460,7 @@ extension Issue.Kind.Snapshot: CustomStringConvertible {
457460
public var description: String {
458461
switch self {
459462
case .unconditional:
460-
"Unconditionally failed"
463+
"Issue recorded"
461464
case let .expectationFailed(expectation):
462465
if let mismatchedErrorDescription = expectation.mismatchedErrorDescription {
463466
"Expectation failed: \(mismatchedErrorDescription)"

0 commit comments

Comments
 (0)