Skip to content

Commit

Permalink
Merge pull request #827 from ahoppen/no-executable-test-target
Browse files Browse the repository at this point in the history
Move tests in `swift-formatTests` to `SwiftFormatTests`
  • Loading branch information
ahoppen authored Oct 1, 2024
2 parents f7df163 + abff181 commit b3314ac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,7 @@ let package = Package(
.product(name: "SwiftSyntax", package: "swift-syntax"),
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
]
),
.testTarget(
name: "swift-formatTests",
dependencies: ["swift-format"]
),
)
]
)

Expand Down
3 changes: 2 additions & 1 deletion Sources/SwiftFormat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ add_library(SwiftFormat
Rules/UseSynthesizedInitializer.swift
Rules/UseTripleSlashForDocumentationComments.swift
Rules/UseWhereClausesInForLoops.swift
Rules/ValidateDocumentationComments.swift)
Rules/ValidateDocumentationComments.swift
Utilities/FileIterator.swift)
target_link_libraries(SwiftFormat PUBLIC
SwiftMarkdown::Markdown
SwiftSyntax::SwiftSyntax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Foundation

/// Iterator for looping over lists of files and directories. Directories are automatically
/// traversed recursively, and we check for files with a ".swift" extension.
@_spi(Testing)
@_spi(Internal)
public struct FileIterator: Sequence, IteratorProtocol {

/// List of file and directory URLs to iterate over.
Expand Down
1 change: 0 additions & 1 deletion Sources/swift-format/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ add_executable(swift-format
Utilities/Diagnostic.swift
Utilities/DiagnosticsEngine.swift
Utilities/FileHandleTextOutputStream.swift
Utilities/FileIterator.swift
Utilities/FormatError.swift
Utilities/StderrDiagnosticPrinter.swift
Utilities/TTY.swift)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

@_spi(Testing) import swift_format
@_spi(Internal) import SwiftFormat

final class FileIteratorTests: XCTestCase {
private var tmpdir: URL!
Expand Down

0 comments on commit b3314ac

Please sign in to comment.