gtest not showing failure message [closed]
Hey,
I wrote some unit tests for my code. Unfortunately, if a test fails I am not getting the failure message, that I defined like this:
EXPECT_DOUBLE_EQ(0.009, min) << "Min value of row 0 not equal 0.009";
I run the tests in the package directory with:
make test
The output looks like this:
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from TestSuite
[ RUN ] TestSuite.testGetMinMax
runTest ... FAILURE!
FAILURE: test [test_ndmaptest] did not generate test results
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/opt/ros/groovy/lib/python2.7/dist-packages/rosunit/baretest.py", line 169, in runTest
self.assert_(os.path.isfile(test_file), "test [%s] did not generate test results"%test_name)
File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue
raise self.failureException(msg)
This error message is printed:
FAIL() << "data_error exception!";
Is this the normal behavior of gtests in ROS or am I simply missing something?
Full source of the test here. I am using Ubuntu 12.04 with Groovy. It's a dry package.
Also a failed EXPECT_* seems to abort the tests. If I understand the documentation correctly only ASSERT_* should abort the tests.
Thanks in advance.
I'm also having this issue right now. Did you find a solution?
Unfortunately no. It would be great if you post a solution if you find one.