Skip to content

Commit 3c96cc6

Browse files
committed
Improve doctest output
1 parent 951e670 commit 3c96cc6

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

test/main.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,20 @@
66
* The full license is in the file LICENSE, distributed with this software.
77
****************************************************************************/
88

9-
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
10-
#include "doctest/doctest.h"
9+
#define DOCTEST_CONFIG_IMPLEMENT
10+
#include "doctest/doctest.h"
11+
12+
int main(int argc, char** argv) {
13+
doctest::Context context;
14+
15+
// Set options to show more detailed test output
16+
context.setOption("success", true);
17+
context.setOption("report-failures", true);
18+
context.setOption("force-colors", true);
19+
20+
context.applyCommandLine(argc, argv);
21+
22+
int res = context.run();
23+
24+
return res;
25+
}

0 commit comments

Comments
 (0)