Skip to content

Commit c6512ff

Browse files
authored
Refactor AdvancedConsoleOutputRecorder to remove fallback recorder dependency (#1354)
1 parent 56506bf commit c6512ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/Testing/Events/Recorder/Event.AdvancedConsoleOutputRecorder.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ extension Event {
142142
/// The write function for this recorder.
143143
let write: @Sendable (String) -> Void
144144

145-
/// The fallback console recorder for standard output.
146-
private let _fallbackRecorder: Event.ConsoleOutputRecorder
145+
/// The base console output options.
146+
private let _baseOptions: Event.ConsoleOutputRecorder.Options
147147

148148
/// Context storage for test information and results.
149149
private let _context: Locked<_Context>
@@ -159,7 +159,7 @@ extension Event {
159159
init(options: Options = Options(), writingUsing write: @escaping @Sendable (String) -> Void) {
160160
self.options = options
161161
self.write = write
162-
self._fallbackRecorder = Event.ConsoleOutputRecorder(options: options.base, writingUsing: write)
162+
self._baseOptions = options.base
163163
self._context = Locked(rawValue: _Context())
164164
self._humanReadableRecorder = Event.HumanReadableOutputRecorder()
165165
}
@@ -258,7 +258,7 @@ extension Event.AdvancedConsoleOutputRecorder {
258258
// The hierarchical summary will be shown at the end
259259
switch eventKind {
260260
case .runStarted:
261-
let symbol = Event.Symbol.default.stringValue(options: _fallbackRecorder.options)
261+
let symbol = Event.Symbol.default.stringValue(options: _baseOptions)
262262
write("\(symbol) Test run started.\n")
263263

264264
case .runEnded:

0 commit comments

Comments
 (0)