[Boost] Command Line to run a specific Boost Test Case using BOOST_AUTO_TEST_CASE_TEMPLATE

Hi,
I would like to run this boost test case using the command line.
Please note that the list contains data types that have 2 or more words.
I need to know what to pass in the Command Line for -run_test=__________
#define BOOST_TEST_MODULE example
#include

Hemanth Choudary M V (RBEI/ETA1
Hi, I would like to run this boost test case using the command line. Please note that the list contains data types that have 2 or more words. I need to know what to pass in the Command Line for –run_test=__________ typedef boost::mpl::list
test_types; BOOST_AUTO_TEST_CASE_TEMPLATE( my_test, T, test_types ) { BOOST_CHECK_EQUAL( sizeof(T), (unsigned)4 ); }
You actually have 2 test cases here. To run one you'll need to do this: test.exe --run_test="my_test<long long>" to run all: test.exe --run_test="my_test*" (tested on windows with latest trunk, but I believe it should work in release version as well). Gennadiy

[Please do not mail me a copy of your followup] boost-users@lists.boost.org spake the secret code <518813FAAE539546847B8F61C0C9B2FA9AF9D831@SGPMBX06.APAC.bosch.com> thusly:
I would like to run this boost test case using the command line. Please note that the list contains data types that have 2 or more words. I need to know what to pass in the Command Line for -run_test=__________
If you run the test executable with --report_level=detailed you will see the names of all the suites and tests cases as the execution proceeeds. You can also use this to debug arguments to --run_test. With your code on Windows and boost 1.53 I get the following output from --report_level=detailed:
ConsoleApplication1.exe --report_level=detailed Running 2 test cases... d:/code/tmp/consoleapplication1/consoleapplication1/main.cpp(13): error in "my_test<__int64>": check sizeof(T) == (unsigned)4 failed [8 != 4] d:/code/tmp/consoleapplication1/consoleapplication1/main.cpp(13): error in "my_test<unsigned char>": check sizeof(T) == (unsigned)4 failed [1 != 4]
Test suite "example" failed with: 2 assertions out of 2 failed 2 test cases out of 2 failed Test case "my_test<__int64>" failed with: 1 assertion out of 1 failed Test case "my_test<unsigned char>" failed with: 1 assertion out of 1 failed Note that boost.test turned "long long" into "__int64", which may be why you had difficulty specifying the name of the test. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com
participants (3)
-
Gennadiy Rozental
-
Hemanth Choudary M V (RBEI/ETA1)
-
legalize+jeeves@mail.xmission.com