Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cppunit: setUp() and tearDown()

I use the framework cppunit to test my classes,I want to know if the methods TestFixture::setUp() and TestFixture::tearDown() are called one time for TEST_SUITE or they are called for each method added to this suite

like image 445
Oumaya Avatar asked Oct 26 '25 09:10

Oumaya


1 Answers

The methods wrap each individual test case. From the docs:

Each test runs in its own fixture so there can be no side effects among test runs.

like image 62
Steve Townsend Avatar answered Oct 28 '25 21:10

Steve Townsend



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!