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
Compact reporter does not handle the [!shouldfail] tag properly. Given this code (from #876):
boolthisThrows() {
throwstd::runtime_error("Boom");
}
TEST_CASE("#748 - captures with unexpected exceptions", "[!shouldfail]") {
int answer = 42;
CAPTURE(answer);
// the message should be printed on the first two sections but not on the thirdSECTION("outside assertions") {
thisThrows();
}
SECTION("inside REQUIRE_NOTHROW") {
REQUIRE_NOTHROW(thisThrows());
}
SECTION("inside REQUIRE_THROWS") {
REQUIRE_THROWS(thisThrows());
}
}
compact reporter's output is
<snip>
Passed all 0 test cases with 1 assertion.
which, while kind-of correct, is surprising. Standard console reporter's output looks like this:
<snip>
test cases: 1 | 1 failed as expected
assertions: 3 | 1 passed | 2 failed as expected
which is much clearer about what happened and should be in some way replicated by the compact reporter.
Extra information
Catch version: v1.8.2
The text was updated successfully, but these errors were encountered:
I thought a bit about how this might look like but any attempts to have all the information on a single line ended up being quite messy (and it will only get worse with #2360). How about we just copy the output format from the console reporter exactly, save for the "totals divider"?
Okay, stylistically, would you prefer (1) a common base class for console and compact reporter, (2) free functions used by both or (3) code duplication?
Description
Compact reporter does not handle the
[!shouldfail]
tag properly. Given this code (from #876):compact reporter's output is
which, while kind-of correct, is surprising. Standard console reporter's output looks like this:
which is much clearer about what happened and should be in some way replicated by the compact reporter.
Extra information
The text was updated successfully, but these errors were encountered: