Skip to content
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

Move usage of testing::internal::CaptureStdout to Logger #276

Open
MarkOates opened this issue Jun 13, 2024 · 1 comment
Open

Move usage of testing::internal::CaptureStdout to Logger #276

MarkOates opened this issue Jun 13, 2024 · 1 comment

Comments

@MarkOates
Copy link
Collaborator

MarkOates commented Jun 13, 2024

Sticky note:

Guards, when tested with testing::internal::CaptureStdout using an ASSERT_ that fails, will not restore state, will leak, and eventually crash.

A couple points:

  1. testing::internal::CaptureStdout should only be used within Logger, and classes that want to output log messages should use Logger and not std::cout or std::cerr.
  2. If test are leaking, look into using death tests, to ensure that leaky state does not occur.
@the-dragons-studio
Copy link

When I have time I might create some pull requests to help with this issue by getting rid of some of the std::cerr uses and replacing them with Logger instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants