Skip to content

Instantly share code, notes, and snippets.

@LegalizeAdulthood
Last active March 2, 2022 13:31
Show Gist options
  • Save LegalizeAdulthood/179f4ff9b1bc48e380478d1e0138ae4a to your computer and use it in GitHub Desktop.
Save LegalizeAdulthood/179f4ff9b1bc48e380478d1e0138ae4a to your computer and use it in GitHub Desktop.
TEST( Foo, foo )
{
int failures = 0;
for (int i = 0; i < 50; ++i) {
EXPECT_TRUE( i % 2 == 0 ) << ([&failures]() { ++failures; return ""; })();
}
if (failures > 0) {
std::cout << "There were " << failures << " failures.\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment