Skip to content

Commit 21e1852

Browse files
committed
We don't need to pass the count of warning issues in the symbol
1 parent d985fe8 commit 21e1852

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Sources/Testing/Events/Recorder/Event.ConsoleOutputRecorder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ extension Event.ConsoleOutputRecorder {
354354
///
355355
/// The caller is responsible for presenting this message to the user.
356356
static func warning(_ message: String, options: Event.ConsoleOutputRecorder.Options) -> String {
357-
let symbol = Event.Symbol.warning().stringValue(options: options)
357+
let symbol = Event.Symbol.warning.stringValue(options: options)
358358
return "\(symbol) \(message)\n"
359359
}
360360
}

Sources/Testing/Events/Recorder/Event.HumanReadableOutputRecorder.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ extension Event.HumanReadableOutputRecorder {
382382
} else if issues.warningIssueCount > 0 {
383383
[
384384
Message(
385-
symbol: .warning(warningIssueCount: issues.warningIssueCount),
385+
symbol: .warning,
386386
stringValue: "\(_capitalizedTitle(for: test)) \(testName) passed after \(duration)\(issues.description)."
387387
)
388388
]
@@ -431,7 +431,7 @@ extension Event.HumanReadableOutputRecorder {
431431
} else {
432432
switch issue.severity {
433433
case .warning:
434-
symbol = .warning(warningIssueCount: 1)
434+
symbol = .warning
435435
introducer = "a warning"
436436
case .error:
437437
symbol = .fail
@@ -538,7 +538,7 @@ extension Event.HumanReadableOutputRecorder {
538538
} else if issues.warningIssueCount > 0 {
539539
[
540540
Message(
541-
symbol: .warning(warningIssueCount: issues.warningIssueCount),
541+
symbol: .warning,
542542
stringValue: "Test run with \(testCount.counting("test")) passed after \(duration)\(issues.description)."
543543
)
544544
]

Sources/Testing/Events/Recorder/Event.Symbol.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ extension Event {
3434

3535
/// A warning or caution symbol to use when the developer should be aware of
3636
/// some condition.
37-
///
38-
/// - Parameters:
39-
/// - warningIssueCount: The number of issues with warning severity
40-
/// recorded for the test. The default value is `0`.
41-
case warning(warningIssueCount: Int = 0)
37+
case warning
4238

4339
/// The symbol to use when presenting details about an event to the user.
4440
case details

0 commit comments

Comments
 (0)