79098467

Date: 2024-10-17 14:11:23
Score: 1
Natty:
Report link

if you use TEST_F and implement your test class with ::testing::Test as base, you can check in the TearDown() if the test has any failures.

class TestsForFunctionX: public ::testing::Test
{
private:
    void TearDown() override
    {
        if (HasFailure())
        {
            std::cerr << "My additional info";
        }
    }
}

TEST_F(TestsForFunctionX, BadInput)
{
    ASSERT_TRUE(false);
}  
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: rhf