a question regarding automatic test module registration

Hi,
I'm trying to use the boost unit test framework, and I have a question
regarding automatic test module registration and the automatic
definition of the init_unit_test_suite() function.
I'm organizing unit tests into a range of source files:
tests1.cpp
tests2.cpp
where each file is set up as follows:
#define BOOST_TEST_MODULE moduleX
#include

Ákos Maróy
Hi,
I'm trying to use the boost unit test framework, and I have a question regarding automatic test module registration and the automatic definition of the init_unit_test_suite() function.
I'm organizing unit tests into a range of source files:
tests1.cpp tests2.cpp
where each file is set up as follows:
#define BOOST_TEST_MODULE moduleX #include
Only one file should define BOOST_TEST_MODULE, after all - you don't need to repeat the name of your test module twice ;)? Gennadiy

Gennadiy,
Only one file should define BOOST_TEST_MODULE, after all - you don't need to repeat the name of your test module twice ;)?
I see. so there's one test module per unit tast executable. this wasn't clear for me. for the other testX.cpp files, I just use the BOOST_AUTO_TEST_CASE macro, and they are going to be registered, right? Akos

Ákos Maróy
Gennadiy,
Only one file should define BOOST_TEST_MODULE, after all - you don't need to repeat the name of your test module twice ;)?
I see. so there's one test module per unit tast executable. this wasn't clear for me.
Unit test executable *is* a test module. Test module may include multiple test files.
for the other testX.cpp files, I just use the BOOST_AUTO_TEST_CASE macro, and they are going to be registered, right?
Yes. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Ákos Maróy