mercredi 23 septembre 2015

Suppress output from library file in google test framework

I am wring the unit testcases to validate one C library function by using google test framework. Sample code:

TEST_F(xyzTestCase, xyzfunc)
{
    int a = xyz(2);
    .....
    ......
    EXPECT_GT(a, 1);
}

library function xyz has some print statement, which I cannot remove. Whenever, I am running this test, it is printing those statement as expected.

Is there a way we can suppress those output in my test? Can we use stdout to suppress these print statement? Please suggest.

Aucun commentaire:

Enregistrer un commentaire