Skip to content

Commit

Permalink
Xcode 16 beta 5: look up macros from current test trait (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
noremac authored Aug 9, 2024
1 parent 20c1a8f commit c33adc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/MacroTesting/AssertMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ public func assertMacro(
let record = record ?? SnapshotTestingConfiguration.current?.record
#endif
withSnapshotTesting(record: record) {
let macros = macros ?? MacroTestingConfiguration.current.macros
#if canImport(Testing)
let macros = macros ?? MacroTestingConfiguration.current.macros ?? Test.current?.macros
#else
let macros = macros ?? MacroTestingConfiguration.current.macros
#endif
guard let macros, !macros.isEmpty else {
recordIssue(
"""
Expand Down

0 comments on commit c33adc7

Please sign in to comment.