@@ -69,7 +69,7 @@ import XCTest
6969/// }
7070/// ```
7171///
72- /// > Tip: Use ``withMacroTesting(indentationWidth:isRecording :macros:operation:)-5id9j `` in your
72+ /// > Tip: Use ``withMacroTesting(indentationWidth:record :macros:operation:)-7cm1s `` in your
7373/// > test case's `invokeTest` to avoid the repetitive work of passing the macro mapping to every
7474/// > `assertMacro`:
7575/// >
@@ -96,17 +96,19 @@ import XCTest
9696///
9797/// - Parameters:
9898/// - macros: The macros to expand in the original source string. Required, either implicitly via
99- /// ``withMacroTesting(indentationWidth:isRecording :macros:operation:)-5id9j ``, or explicitly
99+ /// ``withMacroTesting(indentationWidth:record :macros:operation:)-7cm1s ``, or explicitly
100100/// via this parameter.
101101/// - indentationWidth: The `Trivia` for setting indentation during macro expansion
102102/// (e.g., `.spaces(2)`). Defaults to the original source's indentation if unspecified. If the
103103/// original source lacks indentation, it defaults to `.spaces(4)`.
104- /// - isRecording: Always records new snapshots when enabled.
104+ /// - record: The recording strategy to use for the macro expansion. If not provided, it defaults to the current
105+ /// configuration, which can be set using the `SNAPSHOT_TESTING_RECORD` environment variable
105106/// - originalSource: A string of Swift source code.
106107/// - diagnosedSource: Swift source code annotated with expected diagnostics.
107108/// - fixedSource: Swift source code with expected fix-its applied.
108109/// - expandedSource: Expected Swift source string with macros expanded.
109- /// - file: The file where the assertion occurs. The default is the filename of the test case
110+ /// - fileID: The file ID where the assertion occurs.
111+ /// - filePath: The file where the assertion occurs. The default is the filename of the test case
110112/// where you call this function.
111113/// - function: The function where the assertion occurs. The default is the name of the test
112114/// method where you call this function.
@@ -480,22 +482,24 @@ extension BasicMacroExpansionContext {
480482
481483/// Asserts that a given Swift source string matches an expected string with all macros expanded.
482484///
483- /// See ``assertMacro(_:indentationWidth:record:of:diagnostics:fixes:expansion:file:function:line:column:)-pkfi ``
485+ /// See ``assertMacro(_:indentationWidth:record:of:diagnostics:fixes:expansion:fileID: file:function:line:column:)-90l38 ``
484486/// for more details.
485487///
486488/// - Parameters:
487489/// - macros: The macros to expand in the original source string. Required, either implicitly via
488- /// ``withMacroTesting(indentationWidth:isRecording :macros:operation:)-5id9j ``, or explicitly
490+ /// ``withMacroTesting(indentationWidth:record :macros:operation:)-7cm1s ``, or explicitly
489491/// via this parameter.
490492/// - indentationWidth: The `Trivia` for setting indentation during macro expansion
491493/// (e.g., `.spaces(2)`). Defaults to the original source's indentation if unspecified. If the
492494/// original source lacks indentation, it defaults to `.spaces(4)`.
493- /// - isRecording: Always records new snapshots when enabled.
495+ /// - record: The recording strategy to use. If not provided, it defaults to the current
496+ /// configuration, which can be set using the `SNAPSHOT_TESTING_RECORD` environment variable.
494497/// - originalSource: A string of Swift source code.
495498/// - diagnosedSource: Swift source code annotated with expected diagnostics.
496499/// - fixedSource: Swift source code with expected fix-its applied.
497500/// - expandedSource: Expected Swift source string with macros expanded.
498- /// - file: The file where the assertion occurs. The default is the filename of the test case
501+ /// - fileID: The file ID where the assertion occurs.
502+ /// - filePath: The file where the assertion occurs. The default is the filename of the test case
499503/// where you call this function.
500504/// - function: The function where the assertion occurs. The default is the name of the test
501505/// method where you call this function.
@@ -557,7 +561,7 @@ public func assertMacro(
557561/// ```swift
558562/// class StringifyTests: XCTestCase {
559563/// override func invokeTest() {
560- /// withMacroTesting(isRecording: true , macros: [StringifyMacro.self]) {
564+ /// withMacroTesting(record: .all , macros: [StringifyMacro.self]) {
561565/// super.invokeTest()
562566/// }
563567/// }
@@ -568,7 +572,8 @@ public func assertMacro(
568572/// - indentationWidth: The `Trivia` for setting indentation during macro expansion
569573/// (e.g., `.spaces(2)`). Defaults to the original source's indentation if unspecified. If the
570574/// original source lacks indentation, it defaults to `.spaces(4)`.
571- /// - isRecording: Determines if a new macro expansion will be recorded.
575+ /// - record: The recording strategy to use for the macro expansion. If not provided, it defaults to the current
576+ /// configuration, which can be set using the `SNAPSHOT_TESTING_RECORD` environment variable.
572577/// - macros: Specifies the macros to be expanded in the input Swift source string.
573578/// - operation: The operation to run with the configuration updated.
574579public func withMacroTesting< R> (
@@ -589,14 +594,15 @@ public func withMacroTesting<R>(
589594
590595/// Customizes `assertMacro` for the duration of an operation.
591596///
592- /// See ``withMacroTesting(indentationWidth:isRecording :macros:operation:)-5id9j `` for
597+ /// See ``withMacroTesting(indentationWidth:record :macros:operation:)-7cm1s `` for
593598/// more details.
594599///
595600/// - Parameters:
596601/// - indentationWidth: The `Trivia` for setting indentation during macro expansion
597602/// (e.g., `.spaces(2)`). Defaults to the original source's indentation if unspecified. If the
598603/// original source lacks indentation, it defaults to `.spaces(4)`.
599- /// - isRecording: Determines if a new macro expansion will be recorded.
604+ /// - record: The recording strategy to use for the macro expansion. If not provided, it defaults to the current
605+ /// configuration, which can be set using the `SNAPSHOT_TESTING_RECORD` environment variable.
600606/// - macros: Specifies the macros to be expanded in the input Swift source string.
601607/// - operation: The operation to run with the configuration updated.
602608public func withMacroTesting< R> (
@@ -617,14 +623,15 @@ public func withMacroTesting<R>(
617623
618624/// Customizes `assertMacro` for the duration of an operation.
619625///
620- /// See ``withMacroTesting( indentationWidth:isRecording:macros:operation:)-5id9j`` for
621- /// more details.
626+ /// See ``assertMacro(_: indentationWidth:record:of:diagnostics:fixes:expansion:fileID:file:function:line:column:)-90l38``
627+ /// for more details.
622628///
623629/// - Parameters:
624630/// - indentationWidth: The `Trivia` for setting indentation during macro expansion
625631/// (e.g., `.spaces(2)`). Defaults to the original source's indentation if unspecified. If the
626632/// original source lacks indentation, it defaults to `.spaces(4)`.
627- /// - isRecording: Determines if a new macro expansion will be recorded.
633+ /// - record: The recording strategy to use for the macro expansion. If not provided, it defaults to the current
634+ /// configuration, which can be set using the `SNAPSHOT_TESTING_RECORD` environment variable.
628635/// - macros: Specifies the macros to be expanded in the input Swift source string.
629636/// - operation: The operation to run with the configuration updated.
630637public func withMacroTesting< R> (
@@ -643,14 +650,15 @@ public func withMacroTesting<R>(
643650
644651/// Customizes `assertMacro` for the duration of an operation.
645652///
646- /// See ``withMacroTesting(indentationWidth:isRecording :macros:operation:)-5id9j `` for
653+ /// See ``withMacroTesting(indentationWidth:record :macros:operation:)-7cm1s `` for
647654/// more details.
648655///
649656/// - Parameters:
650657/// - indentationWidth: The `Trivia` for setting indentation during macro expansion
651658/// (e.g., `.spaces(2)`). Defaults to the original source's indentation if unspecified. If the
652659/// original source lacks indentation, it defaults to `.spaces(4)`.
653- /// - isRecording: Determines if a new macro expansion will be recorded.
660+ /// - record: The recording strategy to use for the macro expansion. If not provided, it defaults to the current
661+ /// configuration, which can be set using the `SNAPSHOT_TESTING_RECORD` environment variable
654662/// - macros: Specifies the macros to be expanded in the input Swift source string.
655663/// - operation: The operation to run with the configuration updated.
656664public func withMacroTesting< R> (
0 commit comments