allegroflare / allegro_flare

Application toolkit for Allegro 5
https://clubcatt.com/allegroflare
MIT License
35 stars 6 forks source link

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

Open MarkOates opened 5 months ago

MarkOates commented 5 months ago

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 commented 1 month ago

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.