Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one mark a test as anything like "inconclusive" in Google Test?

Tags:

c++

googletest

We have a test that fails if the test suite is not run with administrator rights. This is expected behavior. However, we want to return something other than success from the test suite so that someone remembers to go back and try the tests again as admin.

Is there a way to tell Google Test that the test hasn't failed, but hasn't really succeeded either?

like image 396
Billy ONeal Avatar asked Jan 25 '12 20:01

Billy ONeal


1 Answers

No, I don't think there is a way to tell GoogleTest that a test has not failed, but has not passed either.

That said, the closest is probably EXPECT, a non-fatal assertion: http://code.google.com/p/googletest/wiki/V1_6_Primer#Assertions

The test will fail, but execution of the test function will continue, which seems to be what you want.

like image 92
Carl Avatar answered Nov 15 '22 10:11

Carl