diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f2604202..05ccf063a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ if(NOT APPLE) find_package(Foundation CONFIG) if(BUILD_TESTING) find_package(XCTest CONFIG) + find_package(Testing CONFIG) endif() endif() diff --git a/Sources/ArgumentParserTestHelpers/CMakeLists.txt b/Sources/ArgumentParserTestHelpers/CMakeLists.txt index 3b6d74fdc..caa6ac7a4 100644 --- a/Sources/ArgumentParserTestHelpers/CMakeLists.txt +++ b/Sources/ArgumentParserTestHelpers/CMakeLists.txt @@ -1,5 +1,6 @@ add_library(ArgumentParserTestHelpers - TestHelpers.swift) + TestHelpers.swift + TestHelpers+SwiftTesting.swift) set_target_properties(ArgumentParserTestHelpers PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) target_link_libraries(ArgumentParserTestHelpers PUBLIC @@ -13,3 +14,7 @@ if(XCTest_Found) target_link_libraries(ArgumentParserTestHelpers PUBLIC XCTest) endif() +if(Testing_FOUND) + target_link_libraries(ArgumentParserTestHelpers PUBLIC + Testing) +endif() diff --git a/Sources/ArgumentParserTestHelpers/TestHelpers+SwiftTesting.swift b/Sources/ArgumentParserTestHelpers/TestHelpers+SwiftTesting.swift new file mode 100644 index 000000000..532f49ca2 --- /dev/null +++ b/Sources/ArgumentParserTestHelpers/TestHelpers+SwiftTesting.swift @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift Argument Parser open source project +// +// Copyright (c) 2026 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + +import ArgumentParser +import Testing + +public func expectResultFailure( + _ expression: @autoclosure () -> Result, + _ message: @autoclosure () -> String = "", + sourceLocation: SourceLocation = #_sourceLocation +) { + AssertResultFailure(expression(), message(), sourceLocation: sourceLocation) +} + +public func expectErrorMessage( + _ type: A.Type, _ arguments: [String], _ errorMessage: String, + sourceLocation: SourceLocation = #_sourceLocation +) { + AssertErrorMessage( + type, arguments, errorMessage, sourceLocation: sourceLocation) +} + +public func expectFullErrorMessage( + _ type: A.Type, _ arguments: [String], _ errorMessage: String, + sourceLocation: SourceLocation = #_sourceLocation +) { + AssertFullErrorMessage( + type, arguments, errorMessage, sourceLocation: sourceLocation) +} + +public func expectParse( + _ type: A.Type, _ arguments: [String], + sourceLocation: SourceLocation = #_sourceLocation, + closure: (A) throws -> Void +) { + AssertParse(type, arguments, sourceLocation: sourceLocation) { + try closure($0) + } +} + +public func expectParseCommand( + _ rootCommand: ParsableCommand.Type, _ type: A.Type, _ arguments: [String], + sourceLocation: SourceLocation = #_sourceLocation, + closure: (A) throws -> Void +) { + AssertParseCommand( + rootCommand, type, arguments, sourceLocation: sourceLocation + ) { + try closure($0) + } +} + +public func expectEqualStrings( + actual: String, + expected: String, + sourceLocation: SourceLocation = #_sourceLocation +) { + AssertEqualStrings( + actual: actual, expected: expected, sourceLocation: sourceLocation) +} diff --git a/Sources/ArgumentParserTestHelpers/TestHelpers.swift b/Sources/ArgumentParserTestHelpers/TestHelpers.swift index bb8a65752..e44fa5772 100644 --- a/Sources/ArgumentParserTestHelpers/TestHelpers.swift +++ b/Sources/ArgumentParserTestHelpers/TestHelpers.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserToolInfo +import Testing import XCTest @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) @@ -80,12 +81,20 @@ public func AssertResultFailure( _ expression: @autoclosure () -> Result, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, - line: UInt = #line + line: UInt = #line, + sourceLocation: SourceLocation = #_sourceLocation ) { switch expression() { case .success: let msg = message() - XCTFail(msg.isEmpty ? "Incorrectly succeeded" : msg, file: file, line: line) + if Test.current != nil { + Issue.record( + msg.isEmpty ? "Incorrectly succeeded" : "\(msg)", + sourceLocation: sourceLocation) + } else { + XCTFail( + msg.isEmpty ? "Incorrectly succeeded" : msg, file: file, line: line) + } case .failure: break } @@ -94,63 +103,118 @@ public func AssertResultFailure( // swift-format-ignore: AlwaysUseLowerCamelCase public func AssertErrorMessage( _ type: A.Type, _ arguments: [String], _ errorMessage: String, - file: StaticString = #filePath, line: UInt = #line + file: StaticString = #filePath, + line: UInt = #line, + sourceLocation: SourceLocation = #_sourceLocation ) where A: ParsableArguments { + do { _ = try A.parse(arguments) - XCTFail("Parsing should have failed.", file: file, line: line) + if Test.current != nil { + Issue.record( + "Parsing should have failed.", sourceLocation: sourceLocation) + } else { + XCTFail("Parsing should have failed.", file: file, line: line) + } } catch { // We expect to hit this path, i.e. getting an error: - XCTAssertEqual(A.message(for: error), errorMessage, file: file, line: line) + if Test.current != nil { + #expect( + A.message(for: error) == errorMessage, + sourceLocation: sourceLocation + ) + } else { + XCTAssertEqual( + A.message(for: error), errorMessage, file: file, line: line) + } } } // swift-format-ignore: AlwaysUseLowerCamelCase public func AssertFullErrorMessage( _ type: A.Type, _ arguments: [String], _ errorMessage: String, - file: StaticString = #filePath, line: UInt = #line + file: StaticString = #filePath, + line: UInt = #line, + sourceLocation: SourceLocation = #_sourceLocation ) where A: ParsableArguments { do { _ = try A.parse(arguments) - XCTFail("Parsing should have failed.", file: (file), line: line) + if Test.current != nil { + Issue.record( + "Parsing should have failed.", sourceLocation: sourceLocation) + } else { + XCTFail("Parsing should have failed.", file: (file), line: line) + } } catch { // We expect to hit this path, i.e. getting an error: - XCTAssertEqual( - A.fullMessage(for: error), errorMessage, file: (file), line: line) + if Test.current != nil { + #expect( + A.fullMessage(for: error) == errorMessage, + sourceLocation: sourceLocation + ) + } else { + XCTAssertEqual( + A.fullMessage(for: error), errorMessage, file: (file), line: line) + } } } // swift-format-ignore: AlwaysUseLowerCamelCase public func AssertParse( _ type: A.Type, _ arguments: [String], file: StaticString = #filePath, - line: UInt = #line, closure: (A) throws -> Void + line: UInt = #line, + sourceLocation: SourceLocation = #_sourceLocation, + closure: (A) throws -> Void ) where A: ParsableArguments { do { let parsed = try type.parse(arguments) try closure(parsed) } catch { let message = type.message(for: error) - XCTFail("\"\(message)\" — \(error)", file: (file), line: line) + if Test.current != nil { + Issue.record( + "\"\(message)\" — \(error)", + sourceLocation: sourceLocation + ) + } else { + XCTFail("\"\(message)\" — \(error)", file: (file), line: line) + } } } // swift-format-ignore: AlwaysUseLowerCamelCase public func AssertParseCommand( _ rootCommand: ParsableCommand.Type, _ type: A.Type, _ arguments: [String], - file: StaticString = #filePath, line: UInt = #line, + file: StaticString = #filePath, + line: UInt = #line, + sourceLocation: SourceLocation = #_sourceLocation, closure: (A) throws -> Void ) { do { let command = try rootCommand.parseAsRoot(arguments) guard let aCommand = command as? A else { - XCTFail( - "Command is of unexpected type: \(command)", file: (file), line: line) + if Test.current != nil { + Issue.record( + "Command is of unexpected type: \(command)", + sourceLocation: sourceLocation + ) + } else { + XCTFail( + "Command is of unexpected type: \(command)", file: (file), line: line) + } return } try closure(aCommand) } catch { let message = rootCommand.message(for: error) - XCTFail("\"\(message)\" — \(error)", file: file, line: line) + if Test.current != nil { + Issue.record( + "\"\(message)\" — \(error)", + sourceLocation: sourceLocation + ) + } else { + XCTFail("\"\(message)\" — \(error)", file: file, line: line) + } } } @@ -158,7 +222,8 @@ public func AssertParseCommand( public func AssertParseCommandErrorMessage( _ rootCommand: ParsableCommand.Type, _ type: A.Type, _ arguments: [String], _ errorMessage: String, - file: StaticString = #filePath, line: UInt = #line + file: StaticString = #filePath, + line: UInt = #line ) { do { let command = try rootCommand.parseAsRoot(arguments) @@ -179,7 +244,8 @@ public func AssertEqualStrings( actual: String, expected: String, file: StaticString = #filePath, - line: UInt = #line + line: UInt = #line, + sourceLocation: SourceLocation = #_sourceLocation ) { // Normalize line endings to '\n'. let actual = @@ -248,10 +314,17 @@ public func AssertEqualStrings( """ } - XCTFail( - "Actual output does not match the expected output:\n\(stringComparison)", - file: file, - line: line) + if Test.current != nil { + Issue.record( + "Actual output does not match the expected output:\n\(stringComparison)", + sourceLocation: sourceLocation + ) + } else { + XCTFail( + "Actual output does not match the expected output:\n\(stringComparison)", + file: file, + line: line) + } } // swift-format-ignore: AlwaysUseLowerCamelCase diff --git a/Tests/ArgumentParserEndToEndTests/CustomParsingEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/CustomParsingEndToEndTests.swift index 62d0d59d3..cf97fbbcf 100644 --- a/Tests/ArgumentParserEndToEndTests/CustomParsingEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/CustomParsingEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class ParsingEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/DefaultAsFlagEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/DefaultAsFlagEndToEndTests.swift index d735ea257..01342620a 100644 --- a/Tests/ArgumentParserEndToEndTests/DefaultAsFlagEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/DefaultAsFlagEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class DefaultAsFlagEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/DefaultSubcommandEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/DefaultSubcommandEndToEndTests.swift index 0730e6f98..30e6a1c77 100644 --- a/Tests/ArgumentParserEndToEndTests/DefaultSubcommandEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/DefaultSubcommandEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParserTestHelpers import ArgumentParserToolInfo +import Testing import XCTest @testable import ArgumentParser @@ -132,7 +133,7 @@ extension DefaultSubcommandEndToEndTests { } } - func testNotMyParent() throws { + func testNotMyParent() { AssertParseCommandErrorMessage( MyCommand.self, BadParent.self, ["--verbose", "bad-parent"], "Command 'Other' is not a parent of the current command.") diff --git a/Tests/ArgumentParserEndToEndTests/DefaultsEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/DefaultsEndToEndTests.swift index 35f78d168..8dc924fcf 100644 --- a/Tests/ArgumentParserEndToEndTests/DefaultsEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/DefaultsEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class DefaultsEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/EnumEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/EnumEndToEndTests.swift index f80bc043c..43d72effa 100644 --- a/Tests/ArgumentParserEndToEndTests/EnumEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/EnumEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class EnumEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/EqualsEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/EqualsEndToEndTests.swift index 4f7656368..c8f6d42b3 100644 --- a/Tests/ArgumentParserEndToEndTests/EqualsEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/EqualsEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class EqualsEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/FlagsEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/FlagsEndToEndTests.swift index 3330d617b..4e3af9711 100644 --- a/Tests/ArgumentParserEndToEndTests/FlagsEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/FlagsEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class FlagsEndToEndTests: XCTestCase { diff --git a/Tests/ArgumentParserEndToEndTests/JoinedEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/JoinedEndToEndTests.swift index c7287ed06..4b5744815 100644 --- a/Tests/ArgumentParserEndToEndTests/JoinedEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/JoinedEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class JoinedEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/LongNameWithShortDashEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/LongNameWithShortDashEndToEndTests.swift index 9eeeb2b3c..95f565fc8 100644 --- a/Tests/ArgumentParserEndToEndTests/LongNameWithShortDashEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/LongNameWithShortDashEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class LongNameWithSingleDashEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/NestedCommandEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/NestedCommandEndToEndTests.swift index db7e33479..85815dd1d 100644 --- a/Tests/ArgumentParserEndToEndTests/NestedCommandEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/NestedCommandEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class NestedCommandEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/OptionGroupEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/OptionGroupEndToEndTests.swift index e571e8f58..cafc25a0b 100644 --- a/Tests/ArgumentParserEndToEndTests/OptionGroupEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/OptionGroupEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class OptionGroupEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/OptionalEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/OptionalEndToEndTests.swift index c57e2ebb0..20999eaff 100644 --- a/Tests/ArgumentParserEndToEndTests/OptionalEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/OptionalEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class OptionalEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/PositionalEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/PositionalEndToEndTests.swift index 7d15530a2..af615454c 100644 --- a/Tests/ArgumentParserEndToEndTests/PositionalEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/PositionalEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class PositionalEndToEndTests: XCTestCase { diff --git a/Tests/ArgumentParserEndToEndTests/RawRepresentableEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/RawRepresentableEndToEndTests.swift index 62114659c..4f7563baf 100644 --- a/Tests/ArgumentParserEndToEndTests/RawRepresentableEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/RawRepresentableEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class RawRepresentableEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests+ParsingStrategy.swift b/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests+ParsingStrategy.swift index e412cef19..098a91949 100644 --- a/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests+ParsingStrategy.swift +++ b/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests+ParsingStrategy.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser diff --git a/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests.swift index 8b0594d3f..2eb9d6770 100644 --- a/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/RepeatingEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class RepeatingEndToEndTests: XCTestCase { diff --git a/Tests/ArgumentParserEndToEndTests/ShortNameEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/ShortNameEndToEndTests.swift index ad10bab03..cb7c8926c 100644 --- a/Tests/ArgumentParserEndToEndTests/ShortNameEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/ShortNameEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class ShortNameEndToEndTests: XCTestCase { diff --git a/Tests/ArgumentParserEndToEndTests/SimpleEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/SimpleEndToEndTests.swift index 2b401b9b8..508c8bb91 100644 --- a/Tests/ArgumentParserEndToEndTests/SimpleEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/SimpleEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class SimpleEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/SingleValueParsingStrategyTests.swift b/Tests/ArgumentParserEndToEndTests/SingleValueParsingStrategyTests.swift index d365a4ab3..583541211 100644 --- a/Tests/ArgumentParserEndToEndTests/SingleValueParsingStrategyTests.swift +++ b/Tests/ArgumentParserEndToEndTests/SingleValueParsingStrategyTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class SingleValueParsingStrategyTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/SubcommandEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/SubcommandEndToEndTests.swift index 1de975b21..d27bbbf53 100644 --- a/Tests/ArgumentParserEndToEndTests/SubcommandEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/SubcommandEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class SubcommandEndToEndTests: XCTestCase { diff --git a/Tests/ArgumentParserEndToEndTests/TransformEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/TransformEndToEndTests.swift index 0d32a35c7..71365e302 100644 --- a/Tests/ArgumentParserEndToEndTests/TransformEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/TransformEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class TransformEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/UnparsedValuesEndToEndTest.swift b/Tests/ArgumentParserEndToEndTests/UnparsedValuesEndToEndTest.swift index 1738a8cb5..ab8ae5938 100644 --- a/Tests/ArgumentParserEndToEndTests/UnparsedValuesEndToEndTest.swift +++ b/Tests/ArgumentParserEndToEndTests/UnparsedValuesEndToEndTest.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class UnparsedValuesEndToEndTests: XCTestCase {} diff --git a/Tests/ArgumentParserEndToEndTests/ValidationEndToEndTests.swift b/Tests/ArgumentParserEndToEndTests/ValidationEndToEndTests.swift index 9a80db981..549d87b05 100644 --- a/Tests/ArgumentParserEndToEndTests/ValidationEndToEndTests.swift +++ b/Tests/ArgumentParserEndToEndTests/ValidationEndToEndTests.swift @@ -11,6 +11,7 @@ import ArgumentParser import ArgumentParserTestHelpers +import Testing import XCTest final class ValidationEndToEndTests: XCTestCase { diff --git a/Tests/ArgumentParserPackageManagerTests/HelpTests.swift b/Tests/ArgumentParserPackageManagerTests/HelpTests.swift index 62c87a287..6ad9a2331 100644 --- a/Tests/ArgumentParserPackageManagerTests/HelpTests.swift +++ b/Tests/ArgumentParserPackageManagerTests/HelpTests.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser diff --git a/Tests/ArgumentParserPackageManagerTests/Tests.swift b/Tests/ArgumentParserPackageManagerTests/Tests.swift index 212cdb213..9863a1df5 100644 --- a/Tests/ArgumentParserPackageManagerTests/Tests.swift +++ b/Tests/ArgumentParserPackageManagerTests/Tests.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser diff --git a/Tests/ArgumentParserUnitTests/CompletionScriptTests.swift b/Tests/ArgumentParserUnitTests/CompletionScriptTests.swift index d34d71aaf..5356ec1f6 100644 --- a/Tests/ArgumentParserUnitTests/CompletionScriptTests.swift +++ b/Tests/ArgumentParserUnitTests/CompletionScriptTests.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser diff --git a/Tests/ArgumentParserUnitTests/ErrorMessageTests.swift b/Tests/ArgumentParserUnitTests/ErrorMessageTests.swift index 960280579..24ed2b87b 100644 --- a/Tests/ArgumentParserUnitTests/ErrorMessageTests.swift +++ b/Tests/ArgumentParserUnitTests/ErrorMessageTests.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser diff --git a/Tests/ArgumentParserUnitTests/HelpGenerationTests.swift b/Tests/ArgumentParserUnitTests/HelpGenerationTests.swift index f83390986..7a4a1871b 100644 --- a/Tests/ArgumentParserUnitTests/HelpGenerationTests.swift +++ b/Tests/ArgumentParserUnitTests/HelpGenerationTests.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser diff --git a/Tests/ArgumentParserUnitTests/ParsableArgumentsValidationTests.swift b/Tests/ArgumentParserUnitTests/ParsableArgumentsValidationTests.swift index 3cdd9fdcc..da58eb64f 100644 --- a/Tests/ArgumentParserUnitTests/ParsableArgumentsValidationTests.swift +++ b/Tests/ArgumentParserUnitTests/ParsableArgumentsValidationTests.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// import ArgumentParserTestHelpers +import Testing import XCTest @testable import ArgumentParser