File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Sources/IssueReportingTestSupport
Tests/IssueReportingTests Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ private func __recordIssue(
1414 column: Int
1515) {
1616 #if canImport(Testing)
17+ let message = message == " " ? nil : message
1718 Issue . record (
1819 message. map ( Comment . init ( rawValue: ) ) ,
1920 sourceLocation: SourceLocation (
Original file line number Diff line number Diff line change 129129 && issue. description == " Issue recorded: Something went wrong "
130130 }
131131 }
132+
133+ @Test
134+ func emptyMessage( ) {
135+ withKnownIssue {
136+ reportIssue ( " " )
137+ }
138+ }
139+
140+ @Test
141+ func emptyMessage_async( ) async {
142+ await withKnownIssue {
143+ await Task . yield ( )
144+ reportIssue ( " " )
145+ }
146+ }
147+
148+ @Test
149+ func emptyMessage_throws( ) throws {
150+ withKnownIssue {
151+ reportIssue ( " " )
152+ }
153+ }
154+
155+ @Test
156+ func emptyMessage_asyncThrows( ) async throws {
157+ await withKnownIssue {
158+ await Task . yield ( )
159+ reportIssue ( " " )
160+ }
161+ }
132162 }
133163
134164 private struct Failure : Error { }
You can’t perform that action at this time.
0 commit comments