Skip to content

Commit ec3b09a

Browse files
committed
Xcode 16 beta 5: look up macros from current test trait
1 parent 20c1a8f commit ec3b09a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/MacroTesting/AssertMacro.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ public func assertMacro(
134134
let record = record ?? SnapshotTestingConfiguration.current?.record
135135
#endif
136136
withSnapshotTesting(record: record) {
137-
let macros = macros ?? MacroTestingConfiguration.current.macros
137+
#if canImport(Testing)
138+
let macros = macros ?? MacroTestingConfiguration.current.macros ?? Test.current?.macros
139+
#else
140+
let macros = macros ?? MacroTestingConfiguration.current.macros
141+
#endif
138142
guard let macros, !macros.isEmpty else {
139143
recordIssue(
140144
"""

0 commit comments

Comments
 (0)