liblittletest icon indicating copy to clipboard operation
liblittletest copied to clipboard

Can't create a suite without set_up and tear_down

Open rcowsill opened this issue 2 years ago • 0 comments

The readme says:

It is possible to define a suite without specifying set_up or tear_down methods.

I tried to do that using the following code:

LT_BEGIN_SUITE(example_suite)
LT_END_SUITE(example_suite)

That gave me compile errors at littletest.hpp lines 367 and 372, because set_up and tear_down are not defined in example_suite.

Providing no-op implementations in the base class suite fixes the errors, and still allows suites to define custom set_up/tear_down if required.

rcowsill avatar Feb 12 '24 13:02 rcowsill