refactor: Suppress printing to stdout in test cases by logging to a reporter#533
Merged
Vighnesh-V merged 1 commit intoprimaryfrom Nov 10, 2025
Merged
refactor: Suppress printing to stdout in test cases by logging to a reporter#533Vighnesh-V merged 1 commit intoprimaryfrom
Vighnesh-V merged 1 commit intoprimaryfrom
Conversation
Member
|
I think there's some compile errors right now, could you check those out? |
3595969 to
ea9ec0f
Compare
Collaborator
Author
|
I think ubuntu runners are a little more picky about includes - this passed on macos locally. I was missing a include. |
c4a0989 to
3908c00
Compare
vrn-sn
reviewed
Nov 7, 2025
vrn-sn
requested changes
Nov 7, 2025
Member
|
Also, don't we need to make CMakeLists.txt changes? (How is this compiling...) Edit: it's compiling because the new files are being included into existing source files, but we should split stuff into .h/.cpp files and add everything to CMakeLists.txt. |
vrn-sn
requested changes
Nov 7, 2025
3908c00 to
b110554
Compare
vrn-sn
reviewed
Nov 7, 2025
0746902 to
cf11f04
Compare
…eporter more changes one more round of feedback
cf11f04 to
a1bee5f
Compare
vrn-sn
approved these changes
Nov 8, 2025
Member
vrn-sn
left a comment
There was a problem hiding this comment.
Might be worth running clang-format one more time just to be safe since I merged in some new clang-format rules earlier today.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 adds a reporter to the Lute.CLI.Lib library. Right now, our tests just log directly to stderr / stdout and we don't have any control over this or ability to intercept and test these calls. I've introduced
LuteReporterwhich hasTestReporterandCliReporteras subclasses, which store reported strings / logs to stderr/stdout respectively.This lets us access the errors logged out in tests as well as suppresses random logging in our tests.
Fixes: #511