-
Notifications
You must be signed in to change notification settings - Fork 111
Split up ConsoleOutputRecorder
into two parts.
#145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4307707
to
504fd0d
Compare
@swift-ci please test |
@swift-ci please test Linux |
@swift-ci please clean test Linux |
@swift-ci please test |
@swift-ci please test Linux |
1 similar comment
@swift-ci please test Linux |
This PR splits `Event.ConsoleOutputRecorder` such that it only contains the code necessary to produce _console output_ (that is, output destined for a terminal with ANSI escape codes, etc.) The logic to produce human-readable text is moved to a separate type, `Event.HumanReadableOutputRecorder`. This type has no knowledge of where the text it generates will be rendered or consumed. By splitting this type into two pieces, we (or external developers) can readily create new event-recording mechanisms that use the same text we do, but which translate that text to different representations such as HTML or `AttributedString`.
b58d72b
to
8bd6ef2
Compare
@swift-ci please test |
@swift-ci please test Linux |
1 similar comment
@swift-ci please test Linux |
stmontgomery
reviewed
Dec 4, 2023
stmontgomery
reviewed
Dec 4, 2023
Sources/Testing/Events/Recorder/Event.HumanReadableOutputRecorder.swift
Outdated
Show resolved
Hide resolved
stmontgomery
reviewed
Dec 4, 2023
stmontgomery
reviewed
Dec 4, 2023
stmontgomery
reviewed
Dec 4, 2023
stmontgomery
reviewed
Dec 4, 2023
@swift-ci please test |
@swift-ci please test |
stmontgomery
approved these changes
Dec 4, 2023
@swift-ci please test |
grynspan
added a commit
that referenced
this pull request
Dec 5, 2023
Accidentally omitted said newline in #145. This PR restores it. Currently, we use this code path when `XCTestScaffold` and `--enable-experimental-swift-testing` are used together.
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
tools integration
🛠️ Integration of swift-testing into tools/IDEs
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR splits
Event.ConsoleOutputRecorder
such that it only contains the code necessary to produce console output (that is, output destined for a terminal with ANSI escape codes, etc.)The logic to produce human-readable text is moved to a separate type,
Event.HumanReadableOutputRecorder
. This type has no knowledge of where the text it generates will be rendered or consumed.By splitting this type into two pieces, we (or external developers) can readily create new event-recording mechanisms that use the same text we do, but which translate that text to different representations such as HTML or
AttributedString
.