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(
14
14
column: Int
15
15
) {
16
16
#if canImport(Testing)
17
+ let message = message == " " ? nil : message
17
18
Issue . record (
18
19
message. map ( Comment . init ( rawValue: ) ) ,
19
20
sourceLocation: SourceLocation (
Original file line number Diff line number Diff line change 129
129
&& issue. description == " Issue recorded: Something went wrong "
130
130
}
131
131
}
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
+ }
132
162
}
133
163
134
164
private struct Failure : Error { }
You can’t perform that action at this time.
0 commit comments