You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey fox!
I'm trying to determine if a test should be executed using
::testing::TestInfo->should_run() before calling RUN_ALL_TESTS()
but it always returns false.
After RUN_ALL_TESTS() all works fine.
I don't know if this is considered a bug, or the info about the tests are
loaded using a "lazy behaviour".
Is there any way to walk around it?
Thanks!
Original issue reported on code.google.com by [email protected] on 13 Oct 2014 at 9:52
RUN_ALL_TESTS() calls RunAllTests() calls FilterTests() which sets the
should_run_ field.
There's what looks like a deliberate wndow of opportunity for main() authors to
manipulate the filters between GoogleTestInit() time and RUN_ALL_TESTS() time,
so it may not be possible to set should_run_ earlier.
With your suggestion I've found out a way to walkaround it by simply running
the test with GTEST_FLAG(list_tests) set to true, before checking the stuffs I
need.
Thank you for the support ;)
Original issue reported on code.google.com by
[email protected]
on 13 Oct 2014 at 9:52Attachments:
The text was updated successfully, but these errors were encountered: