Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

CppUnitTestFramework: Exception in TEST_METHOD_CLEANUP hides exception in TEST_METHOD

$
0
0

In my tests, I use TEST_METHOD_CLEANUP to verify mocked calls. If an expectation is not met, an exception is thrown and I get information about that in the Test Explorer.

However, if a TEST_METHOD previously threw an exception, that output (stack trace) is hidden by the output from the exception thrown in TEST_METHOD_CLEANUP.

If the TEST_METHOD fails with an exception, is it possible for me to detect that inside TEST_METHOD_CLEANUP so that I can skip mock verification?



Viewing all articles
Browse latest Browse all 15302

Trending Articles



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