File tree Expand file tree Collapse file tree 4 files changed +77
-2
lines changed
IssueReportingTestsNoSupport Expand file tree Collapse file tree 4 files changed +77
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ let package = Package(
31
31
" IssueReportingTestSupport " ,
32
32
]
33
33
) ,
34
+ . testTarget(
35
+ name: " IssueReportingTestsNoSupport " ,
36
+ dependencies: [
37
+ " IssueReporting " ,
38
+ ]
39
+ ) ,
34
40
. target(
35
41
name: " IssueReportingTestSupport "
36
42
) ,
Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ let package = Package(
30
30
" IssueReportingTestSupport " ,
31
31
]
32
32
) ,
33
+ . testTarget(
34
+ name: " IssueReportingTestsNoSupport " ,
35
+ dependencies: [
36
+ " IssueReporting " ,
37
+ ]
38
+ ) ,
33
39
. target(
34
40
name: " IssueReportingTestSupport "
35
41
) ,
Original file line number Diff line number Diff line change 12
12
13
13
},
14
14
"testTargets" : [
15
+ {
16
+ "target" : {
17
+ "containerPath" : "container:Examples\/Examples.xcodeproj",
18
+ "identifier" : "CADE79BA2C4A9D2D005A85F7",
19
+ "name" : "ExamplesTests"
20
+ }
21
+ },
22
+ {
23
+ "target" : {
24
+ "containerPath" : "container:",
25
+ "identifier" : "XCTestDynamicOverlayTests",
26
+ "name" : "XCTestDynamicOverlayTests"
27
+ }
28
+ },
15
29
{
16
30
"target" : {
17
31
"containerPath" : "container:",
22
36
{
23
37
"target" : {
24
38
"containerPath" : "container:",
25
- "identifier" : "XCTestDynamicOverlayTests ",
26
- "name" : "XCTestDynamicOverlayTests "
39
+ "identifier" : "IssueReportingTestsNoSupport ",
40
+ "name" : "IssueReportingTestsNoSupport "
27
41
}
28
42
}
29
43
],
Original file line number Diff line number Diff line change
1
+ import IssueReporting
2
+ import Testing
3
+
4
+ @Suite struct WithExpectedIssueTests {
5
+ @Test func sync( ) {
6
+ withExpectedIssue {
7
+ reportIssue ( )
8
+ }
9
+ }
10
+
11
+ @Test func syncThrows( ) throws {
12
+ withExpectedIssue {
13
+ reportIssue ( )
14
+ throw SomeError ( )
15
+ }
16
+ }
17
+
18
+ @Test func asyncAwaitBefore( ) async {
19
+ await withExpectedIssue {
20
+ await Task . yield ( )
21
+ reportIssue ( )
22
+ }
23
+ }
24
+
25
+ @Test func asyncAwaitAfter( ) async {
26
+ await withExpectedIssue {
27
+ reportIssue ( )
28
+ await Task . yield ( )
29
+ }
30
+ }
31
+
32
+ @Test func asyncAwaitBeforeThrows( ) async throws {
33
+ await withExpectedIssue {
34
+ await Task . yield ( )
35
+ reportIssue ( )
36
+ throw SomeError ( )
37
+ }
38
+ }
39
+
40
+ @Test func asyncAwaitAfterThrows( ) async throws {
41
+ await withExpectedIssue {
42
+ reportIssue ( )
43
+ await Task . yield ( )
44
+ throw SomeError ( )
45
+ }
46
+ }
47
+ }
48
+
49
+ private struct SomeError : Error { }
You can’t perform that action at this time.
0 commit comments