I use a single test environment to test my libraries. I have quite a few statements in the library to make sure that programmer errors are caught in debug builds. Now I want to make sure that I test all possible errors of the programmer.
eg. in the Table class, I want to make sure that the rows and columns are no more than the rows and columns of the table. Suppose I forgot to test cols. I would like my unit tests to run a test in which an assertion should be run, and if not, skip the test. Is it possible?
, , , <cassert>, ? , , . , assert <cassert>. Unit test , CUTE, ASSERT_THROWS . .
<cassert>
ASSERT_THROWS
, , , assert . abort . . .
abort
:
, (, , ),
, , , .
, unit test . , unit test, Python ++ ( " ": , , ), - , , , , .
, , - AFAIK .
hth.
, , , , google.
"boost unittest test assert" StackOverflow: Boost Test
"cppunit test assert" :
.