Skip to content

Commit 775da90

Browse files
authored
Rename TestingInternals to _TestingInternals. (#404)
This module is not meant to be accessible outside of swift-testing, however it may be reachable by clients inadvertently. To minimize the likelihood of that, rename the module so it doesn't show up in documentation or Xcode autocomplete contexts. ### 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 500a043 commit 775da90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+37
-37
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let package = Package(
4040
.target(
4141
name: "Testing",
4242
dependencies: [
43-
"TestingInternals",
43+
"_TestingInternals",
4444
"TestingMacros",
4545
],
4646
cxxSettings: .packageSettings,
@@ -79,7 +79,7 @@ let package = Package(
7979
// "Support" targets: These contain C family code and are used exclusively
8080
// by other targets above, not directly included in product libraries.
8181
.target(
82-
name: "TestingInternals",
82+
name: "_TestingInternals",
8383
cxxSettings: .packageSettings
8484
),
8585

[email protected]

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let package = Package(
4040
.target(
4141
name: "Testing",
4242
dependencies: [
43-
"TestingInternals",
43+
"_TestingInternals",
4444
"TestingMacros",
4545
],
4646
cxxSettings: .packageSettings,
@@ -79,7 +79,7 @@ let package = Package(
7979
// "Support" targets: These contain C family code and are used exclusively
8080
// by other targets above, not directly included in product libraries.
8181
.target(
82-
name: "TestingInternals",
82+
name: "_TestingInternals",
8383
cxxSettings: .packageSettings
8484
),
8585

Sources/Testing/EntryPoints/EntryPoint.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// The common implementation of the entry point functions in this file.
1414
///

Sources/Testing/EntryPoints/SwiftPMEntryPoint.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// The entry point to the testing library used by Swift Package Manager.
1414
///

Sources/Testing/EntryPoints/XCTestScaffold.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
#if !SWT_NO_XCTEST_SCAFFOLDING && canImport(XCTest)
12-
private import TestingInternals
12+
private import _TestingInternals
1313
public import XCTest
1414

1515
#if SWT_TARGET_OS_APPLE

Sources/Testing/Events/Clock.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
@_spi(Experimental) @_spi(ForToolsIntegrationOnly)
1414
extension Test {

Sources/Testing/Events/TimeValue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// `internal` because `TimeValue.init(_ timespec:)` below is internal and
1212
// references a type (`timespec`) which comes from this import.
13-
internal import TestingInternals
13+
internal import _TestingInternals
1414

1515
/// A container type representing a time value that is suitable for storage,
1616
/// conversion, encoding, and decoding.

Sources/Testing/ExitTests/ExitCondition.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// An enumeration describing possible conditions under which an exit test will
1414
/// succeed or fail.

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
#if !SWT_NO_EXIT_TESTS
1414
/// A type describing an exit test.

Sources/Testing/ExitTests/WaitFor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
#if !SWT_NO_EXIT_TESTS
12-
internal import TestingInternals
12+
internal import _TestingInternals
1313

1414
#if SWT_TARGET_OS_APPLE || os(Linux)
1515
/// Block the calling thread, wait for the target process to exit, and return

Sources/Testing/SourceAttribution/Backtrace.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// A type representing a backtrace or stack trace.
1414
public struct Backtrace: Sendable {

Sources/Testing/Support/Additions/CommandLineAdditions.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
extension CommandLine {
1414
/// Get the command-line arguments passed to this process.

Sources/Testing/Support/CError.swift

Lines changed: 2 additions & 2 deletions
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-
internal import TestingInternals
11+
internal import _TestingInternals
1212

1313
/// A type representing an error from a C function such as `fopen()`.
1414
///
@@ -48,7 +48,7 @@ func strerror(_ errorCode: CInt) -> String {
4848
return strnlen(buffer.baseAddress!, buffer.count)
4949
}
5050
#else
51-
String(cString: TestingInternals.strerror(errorCode))
51+
String(cString: _TestingInternals.strerror(errorCode))
5252
#endif
5353
}
5454

Sources/Testing/Support/Environment.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// A type describing the environment of the current process.
1414
///

Sources/Testing/Support/FileHandle.swift

Lines changed: 1 addition & 1 deletion
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-
internal import TestingInternals
11+
internal import _TestingInternals
1212

1313
#if !SWT_NO_FILE_IO
1414
/// A type representing a file handle.

Sources/Testing/Support/Locked.swift

Lines changed: 1 addition & 1 deletion
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-
internal import TestingInternals
11+
internal import _TestingInternals
1212

1313
/// A type that wraps a value requiring access from a synchronous caller during
1414
/// concurrent execution.

Sources/Testing/Support/Versions.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// A human-readable string describing the current operating system's version.
1414
///

Sources/Testing/Test+Discovery.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
/// A protocol describing a type that contains tests.
1414
///

Sources/Testing/Traits/Tags/Tag.Color+Loading.swift

Lines changed: 1 addition & 1 deletion
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-
private import TestingInternals
11+
private import _TestingInternals
1212

1313
#if !SWT_NO_FILE_IO
1414
#if os(macOS) || (os(iOS) && targetEnvironment(macCatalyst)) || os(Linux)

Sources/TestingInternals/include/Includes.h renamed to Sources/_TestingInternals/include/Includes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/// into Swift without introducing a module dependency (and because the name of
2020
/// that module varies on a platform-by-platform basis), we instead include C
2121
/// standard library headers _à la carte_. Symbols from these headers are then
22-
/// imported into Swift when a Swift file imports the `TestingInternals` module.
22+
/// imported into Swift when a Swift file imports the `_TestingInternals` module.
2323
///
2424
/// Also include any platform-specific headers here that are needed by the
2525
/// testing library.

Tests/TestingTests/ABIEntryPointTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#if canImport(Foundation) && !SWT_NO_ABI_ENTRY_POINT
1212
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
13-
private import TestingInternals
13+
private import _TestingInternals
1414

1515
@Suite("ABI entry point tests")
1616
struct ABIEntryPointTests {

Tests/TestingTests/ClockTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Suite("Clock API Tests")
1515
struct ClockTests {

Tests/TestingTests/DumpTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
// NOTE: The tests in this file are here to exercise Plan.dump(), but they are
1515
// not intended to actually test that the output is in a particular format since

Tests/TestingTests/EventTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Suite("Event Tests")
1515
struct EventTests {

Tests/TestingTests/ExitTestTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
#if !SWT_NO_EXIT_TESTS
1515
@Suite("Exit test tests") struct ExitTestTests {

Tests/TestingTests/IssueTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
#if canImport(XCTest)
1515
import XCTest

Tests/TestingTests/Support/CErrorTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Suite("CError Tests")
1515
struct CErrorTests {
@@ -38,4 +38,4 @@ struct Win32ErrorTests {
3838
#expect(expectedMessage == description)
3939
}
4040
}
41-
#endif
41+
#endif

Tests/TestingTests/Support/EnvironmentTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Suite("Environment Tests", .serialized)
1515
struct EnvironmentTests {

Tests/TestingTests/Support/FileHandleTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
#if !SWT_NO_FILE_IO
1515
// NOTE: we don't run these tests on iOS (etc.) because processes on those

Tests/TestingTests/SwiftPMTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
private func configurationForEntryPoint(withArguments args: [String]) throws -> Configuration {
1515
let args = try parseCommandLineArguments(from: args)

Tests/TestingTests/Traits/TagListTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Suite("Tag/Tag List Tests", .tags(.traitRelated))
1515
struct TagListTests {

Tests/TestingTests/TypeInfoTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
@testable @_spi(ForToolsIntegrationOnly) import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Suite("TypeInfo Tests")
1515
struct TypeInfoTests {

Tests/TestingTests/VariadicGenericTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
import Testing
12-
private import TestingInternals
12+
private import _TestingInternals
1313

1414
@Test func variadicCStringArguments() async throws {
1515
#expect(swt_pointersNotEqual2("abc", "123"))

0 commit comments

Comments
 (0)