Skip to content

Commit 55c289d

Browse files
committed
Fix cppunit test template
1 parent 2f884f9 commit 55c289d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/template/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
#pragma GCC diagnostic ignored "-Weffc++"
3939
#endif
4040
#include <cppunit/TestCase.h>
41-
#include <cppunit/TestResult.h>
42-
#include <cppunit/TestResultCollector.h>
4341
#include <cppunit/XmlOutputter.h>
4442
#include <cppunit/extensions/HelperMacros.h>
4543
#include <cppunit/ui/text/TestRunner.h>
@@ -91,9 +89,10 @@ int main() {
9189

9290
xmlFileOut.close();
9391
}
94-
catch ( [[maybe_unused]] const std::exception &_exception ) {
92+
catch ( const std::exception &_exception ) {
9593

9694
/* Do not throw exception here */
95+
std::cout << _exception.what() << std::endl;
9796
}
9897

9998
return wasSuccessful ? 0 : 1;

0 commit comments

Comments
 (0)