Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tests in swift-formatTests to SwiftFormatTests #827

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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