Skip to content

Commit c60f130

Browse files
Fix test: issueCountSummingAtRunEnd which was broken by #1247 (#1250)
Fix test: issueCountSummingAtRunEnd which was broken by #1247 Enabling warnings by default broke the test: issueCountSummingAtRunEnd. This fixes that. ### Modifications: I updated the expected output to contain warnings. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 64856c7 commit c60f130

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tests/TestingTests/EventRecorderTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ struct EventRecorderTests {
336336
let testCount = Reference<Int?>()
337337
let suiteCount = Reference<Int?>()
338338
let issueCount = Reference<Int?>()
339+
let warningCount = Reference<Int?>()
339340
let knownIssueCount = Reference<Int?>()
340341

341342
let runFailureRegex = Regex {
@@ -355,6 +356,8 @@ struct EventRecorderTests {
355356
" issue"
356357
Optionally("s")
357358
" (including "
359+
Capture(as: warningCount) { OneOrMore(.digit) } transform: { Int($0) }
360+
" warnings and "
358361
Capture(as: knownIssueCount) { OneOrMore(.digit) } transform: { Int($0) }
359362
" known issue"
360363
Optionally("s")
@@ -368,8 +371,9 @@ struct EventRecorderTests {
368371
)
369372
#expect(match[testCount] == 9)
370373
#expect(match[suiteCount] == 2)
371-
#expect(match[issueCount] == 12)
372-
#expect(match[knownIssueCount] == 5)
374+
#expect(match[issueCount] == 16)
375+
#expect(match[warningCount] == 3)
376+
#expect(match[knownIssueCount] == 6)
373377
}
374378

375379
@Test("Issue counts are summed correctly on run end for a test with only warning issues")

0 commit comments

Comments
 (0)