Boost Users :
Subject: [Boost-users] boost test with assert()
From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-11-18 12:44:05
I use this test class:
static void TestDestructorAfterAddRemoveSimulation();
static void TestDestructorAfterAddRemoveContractSimulation();
static void AddTests(boost::unit_test::test_suite* suite);
TestDestructorxxx() are written so that the code inside,
indirectly, throws an assert(false) (not my code)
I would like to test that indeed, it does throw the assert(false).
void SimulationIdTest::AddTests(boost::unit_test::test_suite* suite)
I tried the above by saying there would be 1 failure, however the test suite
on that failure ( the assert(false) ), even the second argument of
suite->add is 1.
Is there a solution to this case?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net