Making boost/test pause so the console can be read when running the tester from an IDE.

My version of C++ builder does not pause to let me see console output. This makes it difficult to use boost/test while I am running the program from the IDE. The solution I found most useful, is to make the last test wait for the user to press enter. If anyone has solved this a different way, I would like to hear about it. #include <boost/test/unit_test.hpp> using boost::unit_test_framework::test_suite; using std::cout; using std::cin; using std::endl; void waitForUserToPressEnter() { cout << "Press <ENTER> to continue..." << endl; cin.get(); } test_suite* init_unit_test_suite(int argc, char* argv[]) { test_suite* test = BOOST_TEST_SUITE("Master test suite"); //add other tests here test->add(BOOST_TEST_CASE(&waitForUserToPressEnter)); return test; }

My version of C++ builder does not pause to let me see console output. This makes it difficult to use boost/test while I am running the program from the IDE. The solution I found most useful, is to make the last test wait for the user to press enter. If anyone has solved this a different way, I would like to hear about it.
Set a breakpoint on return test... HTH, Jeff

My version of C++ builder does not pause to let me see console output. This makes it difficult to use boost/test while I am running the program from the IDE. The solution I found most useful, is to make the last test wait for the user to press enter. If anyone has solved this a different way, I would like to hear about it.
Add a breakpoint at the end of main? John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm

Unfortunately I do not have recent expiriences with C++ Builder. In majority of the cases with MSVC 6 IDE I include test run in compilaton chain (post build step) and see the test results in Build output window. Maybe C++ builder allows something like this? I found it most useful cause you can jump to the error line using native IDE facilties. In other case you should be able to set a break point into the library code, somewhere near to end of main. Gennadiy.
participants (4)
-
Gennadiy E. Rozental
-
Jeff Garland
-
John Maddock
-
Sean Shubin