diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce21c7d..386c826 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: "509.0.0..<510.0.0", "510.0.0..<511.0.0", "511.0.0..<601.0.0", + "601.0.0..<602.0.0", ] steps: diff --git a/Package.resolved b/Package.resolved index 80436bf..41575b3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-snapshot-testing", "state" : { - "revision" : "b2d4cb30735f4fbc3a01963a9c658336dd21e9ba", - "version" : "1.18.1" + "revision" : "37230a37e83f1b7023be08e1b1a2603fcb1567fb", + "version" : "1.18.4" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/swiftlang/swift-syntax", "state" : { - "revision" : "0687f71944021d616d34d922343dcef086855920", - "version" : "600.0.1" + "revision" : "f99ae8aa18f0cf0d53481901f88a0991dc3bd4a2", + "version" : "601.0.1" } }, { diff --git a/Package.swift b/Package.swift index 7914132..222709c 100644 --- a/Package.swift +++ b/Package.swift @@ -30,7 +30,7 @@ let package = Package( .conditionalPackage( url: "https://github.com/swiftlang/swift-syntax", envVar: "SWIFT_SYNTAX_VERSION", - default: "509.0.0..<601.0.0" + default: "509.0.0..<602.0.0" ), ], targets: [ diff --git a/Sources/MacroTesting/AssertMacro.swift b/Sources/MacroTesting/AssertMacro.swift index 6dc5f86..04dc830 100644 --- a/Sources/MacroTesting/AssertMacro.swift +++ b/Sources/MacroTesting/AssertMacro.swift @@ -549,14 +549,14 @@ public func assertMacro( } } -// From: https://github.com/apple/swift-syntax/blob/d647052/Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift -extension FixIt.Change { +// From: https://github.com/swiftlang/swift-syntax/blob/601.0.1/Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift +fileprivate extension FixIt.Change { /// Returns the edit for this change, translating positions from detached nodes /// to the corresponding locations in the original source file based on /// `expansionContext`. /// /// - SeeAlso: `FixIt.Change.edit` - fileprivate func edit(in expansionContext: BasicMacroExpansionContext) -> SourceEdit { + func edit(in expansionContext: BasicMacroExpansionContext) -> SourceEdit { switch self { case .replace(let oldNode, let newNode): let start = expansionContext.position(of: oldNode.position, anchoredAt: oldNode) @@ -568,21 +568,30 @@ extension FixIt.Change { case .replaceLeadingTrivia(let token, let newTrivia): let start = expansionContext.position(of: token.position, anchoredAt: token) - let end = expansionContext.position( - of: token.positionAfterSkippingLeadingTrivia, anchoredAt: token) + let end = expansionContext.position(of: token.positionAfterSkippingLeadingTrivia, anchoredAt: token) return SourceEdit( range: start..