File tree Expand file tree Collapse file tree 4 files changed +79
-2
lines changed
IssueReportingTestsNoSupport Expand file tree Collapse file tree 4 files changed +79
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ let package = Package(
3737 " IssueReportingTestSupport " ,
3838 ]
3939 ) ,
40+ . testTarget(
41+ name: " IssueReportingTestsNoSupport " ,
42+ dependencies: [
43+ " IssueReporting " ,
44+ ]
45+ ) ,
4046 . target(
4147 name: " IssueReportingTestSupport " ,
4248 dependencies: [
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ let package = Package(
3636 " IssueReportingTestSupport " ,
3737 ]
3838 ) ,
39+ . testTarget(
40+ name: " IssueReportingTestsNoSupport " ,
41+ dependencies: [
42+ " IssueReporting " ,
43+ ]
44+ ) ,
3945 . target(
4046 name: " IssueReportingTestSupport " ,
4147 dependencies: [
Original file line number Diff line number Diff line change 1212
1313 },
1414 "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+ },
1529 {
1630 "target" : {
1731 "containerPath" : "container:",
2236 {
2337 "target" : {
2438 "containerPath" : "container:",
25- "identifier" : "XCTestDynamicOverlayTests ",
26- "name" : "XCTestDynamicOverlayTests "
39+ "identifier" : "IssueReportingTestsNoSupport ",
40+ "name" : "IssueReportingTestsNoSupport "
2741 }
2842 }
2943 ],
Original file line number Diff line number Diff line change 1+ #if canImport(Testing)
2+ import IssueReporting
3+ import Testing
4+
5+ @Suite struct WithExpectedIssueTests {
6+ @Test func sync( ) {
7+ withExpectedIssue {
8+ reportIssue ( )
9+ }
10+ }
11+
12+ @Test func syncThrows( ) throws {
13+ withExpectedIssue {
14+ reportIssue ( )
15+ throw SomeError ( )
16+ }
17+ }
18+
19+ @Test func asyncAwaitBefore( ) async {
20+ await withExpectedIssue {
21+ await Task . yield ( )
22+ reportIssue ( )
23+ }
24+ }
25+
26+ @Test func asyncAwaitAfter( ) async {
27+ await withExpectedIssue {
28+ reportIssue ( )
29+ await Task . yield ( )
30+ }
31+ }
32+
33+ @Test func asyncAwaitBeforeThrows( ) async throws {
34+ await withExpectedIssue {
35+ await Task . yield ( )
36+ reportIssue ( )
37+ throw SomeError ( )
38+ }
39+ }
40+
41+ @Test func asyncAwaitAfterThrows( ) async throws {
42+ await withExpectedIssue {
43+ reportIssue ( )
44+ await Task . yield ( )
45+ throw SomeError ( )
46+ }
47+ }
48+ }
49+
50+ private struct SomeError : Error { }
51+ #endif
You can’t perform that action at this time.
0 commit comments