Skip to content

Commit 3a03d64

Browse files
authored
Move Runner and contained symbols to SPI group ForToolsIntegrationOnly. (#278)
This PR moves `Runner` as well as contained symbols like `Runner.Plan` to the `ForToolsIntegrationOnly` SPI groups per the SPI policy outlined [here](https://github.com/apple/swift-testing/blob/main/Documentation/SPI.md). ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent c0e4f59 commit 3a03d64

22 files changed

+19
-36
lines changed

Sources/Testing/Events/Event.swift

-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public struct Event: Sendable {
1616
/// A test run started.
1717
///
1818
/// This event is the first event posted after ``Runner/run()`` is called.
19-
@_spi(ExperimentalTestRunning)
2019
case runStarted
2120

2221
/// An iteration of the test run started.
@@ -30,7 +29,6 @@ public struct Event: Sendable {
3029
/// By default, a test plan runs for one iteration, but the
3130
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
3231
/// allow for more iterations.
33-
@_spi(ExperimentalTestRunning)
3432
indirect case iterationStarted(_ index: Int)
3533

3634
/// A step in the runner plan started.
@@ -42,7 +40,6 @@ public struct Event: Sendable {
4240
/// ``Runner/Plan/Step``. Processing this step may result in its associated
4341
/// ``Test`` being run, skipped, or another action, so this event will only
4442
/// be followed by a ``testStarted`` event if the step's test is run.
45-
@_spi(ExperimentalTestRunning)
4643
indirect case planStepStarted(_ step: Runner.Plan.Step)
4744

4845
/// A test started.
@@ -112,7 +109,6 @@ public struct Event: Sendable {
112109
///
113110
/// This event is posted when a ``Runner`` finishes processing a
114111
/// ``Runner/Plan/Step``.
115-
@_spi(ExperimentalTestRunning)
116112
indirect case planStepEnded(Runner.Plan.Step)
117113

118114
/// An iteration of the test run ended.
@@ -126,13 +122,11 @@ public struct Event: Sendable {
126122
/// By default, a test plan runs for one iteration, but the
127123
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
128124
/// allow for more iterations.
129-
@_spi(ExperimentalTestRunning)
130125
indirect case iterationEnded(_ index: Int)
131126

132127
/// A test run ended.
133128
///
134129
/// This event is the last event posted before ``Runner/run()`` returns.
135-
@_spi(ExperimentalTestRunning)
136130
case runEnded
137131
}
138132

@@ -323,7 +317,6 @@ extension Event.Kind {
323317
/// A test run started.
324318
///
325319
/// This is the first event posted after ``Runner/run()`` is called.
326-
@_spi(ExperimentalTestRunning)
327320
case runStarted
328321

329322
/// An iteration of the test run started.
@@ -337,7 +330,6 @@ extension Event.Kind {
337330
/// By default, a test plan runs for one iteration, but the
338331
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
339332
/// allow for more iterations.
340-
@_spi(ExperimentalTestRunning)
341333
indirect case iterationStarted(_ index: Int)
342334

343335
/// A step in the runner plan started.
@@ -349,7 +341,6 @@ extension Event.Kind {
349341
/// ``Runner/Plan/Step``. Processing this step may result in its associated
350342
/// ``Test`` being run, skipped, or another action, so this event will only
351343
/// be followed by a ``testStarted`` event if the step's test is run.
352-
@_spi(ExperimentalTestRunning)
353344
case planStepStarted
354345

355346
/// A test started.
@@ -401,7 +392,6 @@ extension Event.Kind {
401392
///
402393
/// This is posted when a ``Runner`` finishes processing a
403394
/// ``Runner/Plan/Step``.
404-
@_spi(ExperimentalTestRunning)
405395
case planStepEnded
406396

407397
/// An iteration of the test run ended.
@@ -415,13 +405,11 @@ extension Event.Kind {
415405
/// By default, a test plan runs for one iteration, but the
416406
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
417407
/// allow for more iterations.
418-
@_spi(ExperimentalTestRunning)
419408
indirect case iterationEnded(_ index: Int)
420409

421410
/// A test run ended.
422411
///
423412
/// This is the last event posted before ``Runner/run()`` returns.
424-
@_spi(ExperimentalTestRunning)
425413
case runEnded
426414

427415
/// Snapshots an ``Event.Kind``.

Sources/Testing/Running/Runner.Plan+Dumping.swift

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@_spi(ExperimentalTestRunning)
1211
extension Runner.Plan {
1312
/// Write a dump of the specified step graph to a stream.
1413
///
@@ -105,7 +104,6 @@ extension Runner.Plan {
105104
///
106105
/// - Note: The output of this function is not intended to be machine-readable
107106
/// and its format may change over time.
108-
@_spi(InternalDiagnostics)
109107
public func dump(to stream: inout some TextOutputStream, verbose: Bool = false, indent: Int = 2) {
110108
if verbose {
111109
Swift.dump(self, to: &stream, indent: indent)

Sources/Testing/Running/Runner.Plan.swift

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@_spi(ExperimentalTestRunning)
1211
extension Runner {
1312
/// A type describing a runner plan.
1413
public struct Plan: Sendable {
@@ -130,7 +129,6 @@ extension Runner {
130129

131130
// MARK: - Constructing a new runner plan
132131

133-
@_spi(ExperimentalTestRunning)
134132
extension Runner.Plan {
135133
/// Recursively apply eligible traits from a test suite to its children in a
136134
/// graph.

Sources/Testing/Running/Runner.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
/// A type that runs tests according to a given configuration.
12-
@_spi(ExperimentalTestRunning)
12+
@_spi(ForToolsIntegrationOnly)
1313
public struct Runner: Sendable {
1414
/// The plan to follow when running the associated tests.
1515
public var plan: Plan
@@ -55,7 +55,6 @@ public struct Runner: Sendable {
5555

5656
// MARK: - Running tests
5757

58-
@_spi(ExperimentalTestRunning)
5958
extension Runner {
6059
/// Catch errors thrown from a closure and process them as issues instead of
6160
/// allowing them to propagate to the caller.

Tests/TestingTests/BacktraceTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1212
#if canImport(Foundation)
1313
import Foundation
1414
#endif

Tests/TestingTests/ConfirmationTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
@Suite("Confirmation Tests")
1414
struct ConfirmationTests {

Tests/TestingTests/DumpTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(InternalDiagnostics) @_spi(ExperimentalTestRunning) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1212
private import TestingInternals
1313

1414
// NOTE: The tests in this file are here to exercise Plan.dump(), but they are

Tests/TestingTests/EventRecorderTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212
#if !os(Windows)
1313
import RegexBuilder
1414
#endif

Tests/TestingTests/IssueTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212
private import TestingInternals
1313

1414
#if canImport(XCTest)

Tests/TestingTests/ObjCInteropTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
import XCTest
12-
@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
12+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1313

1414
final class NonXCTestCaseClassTests: NSObject {
1515
@Test("Methods on non-XCTestCase subclasses are supported")

Tests/TestingTests/PlanIterationTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
@Suite("Configuration.RepetitionPolicy Tests")
1414
struct PlanIterationTests {

Tests/TestingTests/PlanTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
@Suite("Runner.Plan Tests")
1414
struct PlanTests {

Tests/TestingTests/Runner.Plan.SnapshotTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
#if canImport(Foundation)
1414
import Foundation

Tests/TestingTests/SwiftPMTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212
#if canImport(Foundation)
1313
import Foundation
1414
#endif

Tests/TestingTests/Test.Case.ArgumentTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) @_spi(Experimental) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) @_spi(Experimental) import Testing
1212

1313
@Suite("Test.Case.Argument Tests")
1414
struct Test_Case_ArgumentTests {

Tests/TestingTests/Test.ID.SelectionTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) import Testing
11+
@testable import Testing
1212

1313
@Suite("Test.ID.Selection Tests")
1414
struct Test_ID_SelectionTests {

Tests/TestingTests/TestCaseSelectionTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) @_spi(Experimental) import Testing
11+
@testable @_spi(ForToolsIntegrationOnly) @_spi(Experimental) import Testing
1212

1313
@Suite("Test.Case Selection Tests")
1414
struct TestCaseSelectionTests {

Tests/TestingTests/Traits/CommentTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(Experimental) @_spi(ExperimentalTestRunning) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
@Suite("Comment Tests", .tags(.traitRelated))
1414
struct CommentTests {

Tests/TestingTests/Traits/SerialTraitTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(Experimental) @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
@Suite("Serial Trait Tests", .tags("trait"))
1414
struct SerialTraitTests {

Tests/TestingTests/Traits/TagListTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
#if canImport(Foundation)
1414
import Foundation

Tests/TestingTests/Traits/TimeLimitTraitTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
11+
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
1212

1313
@Suite("TimeLimitTrait Tests", .tags(.traitRelated))
1414
struct TimeLimitTraitTests {

Tests/TestingTests/ZipTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
@testable @_spi(ExperimentalTestRunning) import Testing
11+
@testable import Testing
1212

1313
@Suite("zip Tests")
1414
struct ZipTests {

0 commit comments

Comments
 (0)