Skip to content

Commit bdef4a5

Browse files
committed
Remove some unnecessary changes from the diff
1 parent bc3e04b commit bdef4a5

File tree

8 files changed

+10
-32
lines changed

8 files changed

+10
-32
lines changed

Sources/Testing/ExitTests/ExitTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ extension ExitTest {
438438
// External tools authors should set up their own back channel mechanisms
439439
// and ensure they're installed before calling ExitTest.callAsFunction().
440440
guard var result = find(at: sourceLocation) else {
441-
fatalError("Could not find an exit test that should have been located at \(sourceLocation).")
441+
return nil
442442
}
443443

444444
// We can't say guard let here because it counts as a consume.

Sources/Testing/SourceAttribution/Expression.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
/// let swiftSyntaxExpr: ExprSyntax = "\(testExpr)"
2323
/// ```
2424
///
25-
/// - Warning: This type is used to implement the `#expect()` macro. Do not use
26-
/// it directly. Tools can use the SPI ``Expression`` typealias if needed.
25+
/// - Warning: This type is used to implement the `#expect(exitsWith:)`
26+
/// macro. Do not use it directly. Tools can use the SPI ``Expression``
27+
/// typealias if needed.
2728
public struct __Expression: Sendable {
2829
/// An enumeration describing the various kinds of expression that can be
2930
/// captured.

Sources/Testing/Support/Additions/NumericAdditions.swift

-16
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,3 @@ extension UInt8 {
3434
self == UInt8(ascii: "\r") || self == UInt8(ascii: "\n")
3535
}
3636
}
37-
38-
// MARK: -
39-
40-
extension Int {
41-
/// Get the next integer after this one that is properly aligned to store a
42-
/// value of type `T`.
43-
///
44-
/// - Parameters:
45-
/// - type: the type whose alignment should be used to compute the result.
46-
///
47-
/// - Returns: an integer greater than or equal to `self` whose value is
48-
/// properly aligned to store a value of type `T`.
49-
func alignedUp(for type: (some Any).Type) -> Self {
50-
Self(bitPattern: UnsafeRawPointer(bitPattern: self)?.alignedUp(for: type))
51-
}
52-
}

Sources/Testing/Test+Macro.swift

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

11-
/// This file provides support for the `@Test` macro. Other than the macro
12-
/// itself, the symbols in this file should not be used directly and are subject
13-
/// to change as the testing library evolves.
14-
1511
#if _runtime(_ObjC)
1612
public import ObjectiveC
1713

@@ -46,6 +42,10 @@ public typealias __XCTestCompatibleSelector = Never
4642
#endif
4743
}
4844

45+
/// This file provides support for the `@Test` macro. Other than the macro
46+
/// itself, the symbols in this file should not be used directly and are subject
47+
/// to change as the testing library evolves.
48+
4949
// MARK: - @Suite
5050

5151
/// Declare a test suite.
@@ -499,8 +499,8 @@ extension Test {
499499
/// - Note: This macro has compile-time effects _only_ and should not affect a
500500
/// compiled test target.
501501
///
502-
/// - Warning: This macro is used to implement other macros declared by the
503-
/// testing library. Do not use it directly.
502+
/// - Warning: This macro is used to implement other macros declared by the testing
503+
/// library. Do not use it directly.
504504
@attached(peer) public macro __testing(
505505
semantics arguments: _const String...
506506
) = #externalMacro(module: "TestingMacros", type: "PragmaMacro")

Sources/TestingMacros/ConditionMacro.swift

-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ extension ExitTestConditionMacro {
478478

479479
#if !SWT_NO_LEGACY_TEST_DISCOVERY
480480
// Emit a legacy type declaration if SymbolLinkageMarkers is off.
481-
// TODO: remove this decl when we drop support for emitting legacy metadata
482481
let legacyEnumName = context.makeUniqueName("__🟠$exit_test_body__")
483482
decls.append(
484483
"""

Sources/TestingMacros/SuiteDeclarationMacro.swift

-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ public struct SuiteDeclarationMacro: MemberMacro, PeerMacro, Sendable {
169169
// also annotated unavailable, since it's meant only for use by the testing
170170
// library at runtime. The compiler does not allow combining 'unavailable'
171171
// and 'deprecated' into a single availability attribute: rdar://111329796
172-
// TODO: remove this decl when we drop support for emitting legacy metadata
173172
let typeName = declaration.type.tokens(viewMode: .fixedUp).map(\.textWithoutBackticks).joined()
174173
let enumName = context.makeUniqueName("__🟠$test_container__suite__\(typeName)")
175174
result.append(

Sources/TestingMacros/TestDeclarationMacro.swift

-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,6 @@ public struct TestDeclarationMacro: PeerMacro, Sendable {
484484
// by the testing library at runtime. The compiler does not allow combining
485485
// 'unavailable' and 'deprecated' into a single availability attribute:
486486
// rdar://111329796
487-
// TODO: remove this decl when we drop support for emitting legacy metadata
488487
let enumName = context.makeUniqueName(thunking: functionDecl, withPrefix: "__🟠$test_container__function__")
489488
result.append(
490489
"""

Sources/_TestingInternals/include/Includes.h

-4
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@
9696
#include <limits.h>
9797
#endif
9898

99-
#if __has_include(<link.h>)
100-
#include <link.h>
101-
#endif
102-
10399
#if __has_include(<spawn.h>)
104100
#include <spawn.h>
105101
#endif

0 commit comments

Comments
 (0)