diff --git a/Sources/MacroTesting/AssertMacro.swift b/Sources/MacroTesting/AssertMacro.swift index cd4860b..604ba6c 100644 --- a/Sources/MacroTesting/AssertMacro.swift +++ b/Sources/MacroTesting/AssertMacro.swift @@ -204,7 +204,8 @@ public func assertMacro( var expandedSourceFile = origSourceFile.expand( macros: macros, contextGenerator: { syntax in - BasicMacroExpansionContext(sharingWith: context, lexicalContext: syntax.allMacroLexicalContexts()) + BasicMacroExpansionContext( + sharingWith: context, lexicalContext: syntax.allMacroLexicalContexts()) }, indentationWidth: indentationWidth ) diff --git a/Tests/MacroTestingTests/EntryMacroTests.swift b/Tests/MacroTestingTests/EntryMacroTests.swift index 96403f4..057ac35 100644 --- a/Tests/MacroTestingTests/EntryMacroTests.swift +++ b/Tests/MacroTestingTests/EntryMacroTests.swift @@ -5,7 +5,7 @@ final class EntryMacroTests: BaseTestCase { override func invokeTest() { withMacroTesting( macros: [ - EntryMacro.self, + EntryMacro.self ] ) { super.invokeTest() diff --git a/Tests/MacroTestingTests/MacroExamples/EntryMacro.swift b/Tests/MacroTestingTests/MacroExamples/EntryMacro.swift index 3cb8486..17c94fc 100644 --- a/Tests/MacroTestingTests/MacroExamples/EntryMacro.swift +++ b/Tests/MacroTestingTests/MacroExamples/EntryMacro.swift @@ -9,17 +9,19 @@ public struct EntryMacro: AccessorMacro { in context: some MacroExpansionContext ) throws -> [AccessorDeclSyntax] { let isInEnvironmentValues = context.lexicalContext.contains { lexicalContext in - lexicalContext.as(ExtensionDeclSyntax.self)?.extendedType.trimmedDescription == "EnvironmentValues" + lexicalContext.as(ExtensionDeclSyntax.self)?.extendedType.trimmedDescription + == "EnvironmentValues" } guard isInEnvironmentValues else { - throw MacroExpansionErrorMessage("'@Entry' macro can only attach to var declarations inside extensions of EnvironmentValues") + throw MacroExpansionErrorMessage( + "'@Entry' macro can only attach to var declarations inside extensions of EnvironmentValues") } return [ AccessorDeclSyntax(accessorSpecifier: .keyword(.get)) { "fatalError()" - }, + } ] } }