Skip to content

Commit d42912d

Browse files
committed
wip
1 parent ed21414 commit d42912d

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

Tests/IssueReportingTests/SwiftTestingTests.swift

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
}
4848
}
4949

50-
@Test func withExpectedAsyncIssue_reportIssue() async {
50+
@Test func withExpectedIssue_reportIssue_Async() async {
5151
await withExpectedIssue {
5252
await Task.yield()
5353
reportIssue()
@@ -73,6 +73,16 @@
7373
}
7474
}
7575

76+
@Test func withExpectedIssue_NoMessage_NoIssue_Async() async {
77+
await withKnownIssue {
78+
await withExpectedIssue {
79+
await Task.yield()
80+
}
81+
} matching: { issue in
82+
issue.description == "Known issue was not recorded"
83+
}
84+
}
85+
7686
@Test func withExpectedIssue_CustomMessage_NoIssue() {
7787
withKnownIssue {
7888
withExpectedIssue("This didn't fail") {
@@ -82,10 +92,26 @@
8292
}
8393
}
8494

85-
@Test func withExpectedIssue_IsIntermittent() async throws {
95+
@Test func withExpectedIssue_CustomMessage_NoIssue_Async() async {
96+
await withKnownIssue {
97+
await withExpectedIssue("This didn't fail") {
98+
await Task.yield()
99+
}
100+
} matching: { issue in
101+
issue.description == "Known issue was not recorded: This didn't fail"
102+
}
103+
}
104+
105+
@Test func withExpectedIssue_IsIntermittent() {
86106
withExpectedIssue(isIntermittent: true) {
87107
}
88108
}
109+
110+
@Test func withExpectedIssue_IsIntermittent_Async() async {
111+
await withExpectedIssue(isIntermittent: true) {
112+
await Task.yield()
113+
}
114+
}
89115
}
90116

91117
private struct Failure: Error {}

0 commit comments

Comments
 (0)