I have some code that I wrote earlier this year that uses CppUnit and it was all working fine. I tried downloading the newest stable release and using it again and it crashes when I set the outputter. Here's the error:
Unhandled exception at 0x7c901230 in MatrixTestRunner.exe: User breakpoint.
And here's the code I run:
// Get the top level suite from the registry
CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
// Adds the test to the list of test to run
CppUnit::TextUi::TestRunner runner;
runner.addTest( suite );
// Change the default outputter to a compiler error format outputter
runner.setOutputter( new CppUnit::CompilerOutputter(&runner.result(), std::cerr));
// Run the tests.
return runner.run() ? 0: 1;
Any ideas on what I need to do to fix this? And the weird part is that according to the dates the stable release hasn't changed since I had it working.
Thanks,
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have some code that I wrote earlier this year that uses CppUnit and it was all working fine. I tried downloading the newest stable release and using it again and it crashes when I set the outputter. Here's the error:
Unhandled exception at 0x7c901230 in MatrixTestRunner.exe: User breakpoint.
And here's the code I run:
// Get the top level suite from the registry
CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
// Adds the test to the list of test to run
CppUnit::TextUi::TestRunner runner;
runner.addTest( suite );
// Change the default outputter to a compiler error format outputter
runner.setOutputter( new CppUnit::CompilerOutputter(&runner.result(), std::cerr));
// Run the tests.
return runner.run() ? 0: 1;
Any ideas on what I need to do to fix this? And the weird part is that according to the dates the stable release hasn't changed since I had it working.
Thanks,
Dave
Sorry, I forgot to mention that I am building this on Visual Studio 2003 on Windows XP and that hasn't changed since I build it last time.
Dave
Hello Dave,
I experienced the same problem as you are undergoing. Change the following statement
runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(
&runner.result(), std::cout) );
I think it should for you too....
Anant