Skip to content

Commit b39ea52

Browse files
committed
Mark test functions in SwiftIfConfigTests that are only used in one file as file private
1 parent 39c27ab commit b39ea52

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Sources/SwiftIfConfig/ActiveSyntaxVisitor.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ import SwiftSyntax
3737
/// it would not visit either `f` or `g`.
3838
///
3939
/// All notes visited by this visitor will have the "active" state, i.e.,
40-
/// `node.isActive(in: configuration)` will have evaluated to `.active`
41-
/// When errors occur, they will be recorded in the set of
42-
/// diagnostics.
40+
/// `node.isActive(in: configuration)` will have evaluated to `.active`.
41+
/// When errors occur, they will be recorded in the array of diagnostics.
4342
open class ActiveSyntaxVisitor<Configuration: BuildConfiguration>: SyntaxVisitor {
4443
/// The build configuration, which will be queried for each relevant `#if`.
4544
public let configuration: Configuration

Tests/SwiftIfConfigTest/ActiveRegionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class ActiveRegionTests: XCTestCase {
104104

105105
/// Assert that the various marked positions in the source code have the
106106
/// expected active states.
107-
func assertActiveCode(
107+
fileprivate func assertActiveCode(
108108
_ markedSource: String,
109109
configuration: some BuildConfiguration = TestingBuildConfiguration(),
110110
states: [String: IfConfigRegionState],

Tests/SwiftIfConfigTest/EvaluateTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public class EvaluateTests: XCTestCase {
234234

235235
/// Assert the results of evaluating the condition within an `#if` against the
236236
/// given build configuration.
237-
func assertIfConfig(
237+
fileprivate func assertIfConfig(
238238
_ condition: ExprSyntax,
239239
_ expectedState: IfConfigRegionState,
240240
configuration: some BuildConfiguration = TestingBuildConfiguration(),

Tests/SwiftIfConfigTest/VisitorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public class VisitorTests: XCTestCase {
257257

258258
/// Assert that applying the given build configuration to the source code
259259
/// returns the expected source and diagnostics.
260-
func assertRemoveInactive(
260+
fileprivate func assertRemoveInactive(
261261
_ source: String,
262262
configuration: some BuildConfiguration,
263263
diagnostics expectedDiagnostics: [DiagnosticSpec] = [],

0 commit comments

Comments
 (0)