Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Google Test return value

$
0
0

I'm using Google Test and Google Mock frameworks for a project's unit tests. I have various unit tests projects and want to automate my build so to run all of them.

I was expecting the unit tests executable to return 0 on success and 1 (or any other value) on any test failure, but I'm getting 1 when all tests passed. I'm getting some GMOCK warnings but couldn't find any documentation about warnings affecting return value.

I tried running the tests filtering to run just one test case where no GMOCK warnings are triggered and still get 1 as return value.

I had a couple of DISABLED test cases, so I commented them out. Still getting 1 as return value.

According to documentation and code comments for RUN_ALL_TESTS macro, the return value should be 0.

I can't think of anything else causing return value 1. Am I missing anything?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>