@@ -25,10 +25,13 @@ private import _TestingInternals
25
25
/// A type describing an exit test.
26
26
///
27
27
/// Instances of this type describe exit tests you create using the
28
- /// ``expect(exitsWith:observing:_:sourceLocation:performing:)``
28
+ /// ``expect(exitsWith:observing:_:sourceLocation:performing:)`` or
29
29
/// ``require(exitsWith:observing:_:sourceLocation:performing:)`` macro. You
30
30
/// don't usually need to interact directly with an instance of this type.
31
- @_spi ( Experimental)
31
+ ///
32
+ /// @Metadata {
33
+ /// @Available(Swift, introduced: 6.2)
34
+ /// }
32
35
#if SWT_NO_EXIT_TESTS
33
36
@available ( * , unavailable, message: " Exit tests are not available on this platform. " )
34
37
#endif
@@ -97,7 +100,6 @@ public struct ExitTest: Sendable, ~Copyable {
97
100
#if !SWT_NO_EXIT_TESTS
98
101
// MARK: - Current
99
102
100
- @_spi ( Experimental)
101
103
extension ExitTest {
102
104
/// A container type to hold the current exit test.
103
105
///
@@ -127,6 +129,10 @@ extension ExitTest {
127
129
///
128
130
/// The value of this property is constant across all tasks in the current
129
131
/// process.
132
+ ///
133
+ /// @Metadata {
134
+ /// @Available(Swift, introduced: 6.2)
135
+ /// }
130
136
public static var current : ExitTest ? {
131
137
_read {
132
138
if let current = _current. rawValue {
@@ -140,7 +146,7 @@ extension ExitTest {
140
146
141
147
// MARK: - Invocation
142
148
143
- @_spi ( Experimental ) @ _spi ( ForToolsIntegrationOnly)
149
+ @_spi ( ForToolsIntegrationOnly)
144
150
extension ExitTest {
145
151
/// Disable crash reporting, crash logging, or core dumps for the current
146
152
/// process.
@@ -245,7 +251,7 @@ extension ExitTest: TestContent {
245
251
typealias TestContentAccessorHint = ID
246
252
}
247
253
248
- @_spi ( Experimental ) @ _spi ( ForToolsIntegrationOnly)
254
+ @_spi ( ForToolsIntegrationOnly)
249
255
extension ExitTest {
250
256
/// Find the exit test function at the given source location.
251
257
///
@@ -381,7 +387,7 @@ extension ABI {
381
387
fileprivate typealias BackChannelVersion = v1
382
388
}
383
389
384
- @_spi ( Experimental ) @ _spi ( ForToolsIntegrationOnly)
390
+ @_spi ( ForToolsIntegrationOnly)
385
391
extension ExitTest {
386
392
/// A handler that is invoked when an exit test starts.
387
393
///
@@ -417,7 +423,7 @@ extension ExitTest {
417
423
/// events should be written, or `nil` if the file handle could not be
418
424
/// resolved.
419
425
private static let _backChannelForEntryPoint : FileHandle ? = {
420
- guard let backChannelEnvironmentVariable = Environment . variable ( named: " SWT_EXPERIMENTAL_BACKCHANNEL " ) else {
426
+ guard let backChannelEnvironmentVariable = Environment . variable ( named: " SWT_BACKCHANNEL " ) else {
421
427
return nil
422
428
}
423
429
@@ -450,7 +456,7 @@ extension ExitTest {
450
456
static func findInEnvironmentForEntryPoint( ) -> Self ? {
451
457
// Find the ID of the exit test to run, if any, in the environment block.
452
458
var id : ExitTest . ID ?
453
- if var idString = Environment . variable ( named: " SWT_EXPERIMENTAL_EXIT_TEST_ID " ) {
459
+ if var idString = Environment . variable ( named: " SWT_EXIT_TEST_ID " ) {
454
460
id = try ? idString. withUTF8 { idBuffer in
455
461
try JSON . decode ( ExitTest . ID. self, from: UnsafeRawBufferPointer ( idBuffer) )
456
462
}
@@ -583,7 +589,7 @@ extension ExitTest {
583
589
// Insert a specific variable that tells the child process which exit test
584
590
// to run.
585
591
try JSON . withEncoding ( of: exitTest. id) { json in
586
- childEnvironment [ " SWT_EXPERIMENTAL_EXIT_TEST_ID " ] = String ( decoding: json, as: UTF8 . self)
592
+ childEnvironment [ " SWT_EXIT_TEST_ID " ] = String ( decoding: json, as: UTF8 . self)
587
593
}
588
594
589
595
typealias ResultUpdater = @Sendable ( inout ExitTest . Result ) -> Void
@@ -629,7 +635,7 @@ extension ExitTest {
629
635
#warning("Platform-specific implementation missing: back-channel pipe unavailable")
630
636
#endif
631
637
if let backChannelEnvironmentVariable {
632
- childEnvironment [ " SWT_EXPERIMENTAL_BACKCHANNEL " ] = backChannelEnvironmentVariable
638
+ childEnvironment [ " SWT_BACKCHANNEL " ] = backChannelEnvironmentVariable
633
639
}
634
640
635
641
// Spawn the child process.
0 commit comments