all builds should pass now!
diff --git a/doc/markdown/main.md b/doc/markdown/main.md
index 6b5ce22..87094c7 100644
--- a/doc/markdown/main.md
+++ b/doc/markdown/main.md
@@ -25,7 +25,7 @@
// defaults
context.addFilter("test-case-exclude", "*math*"); // exclude test cases with "math" in their name
context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
- context.setOption("order_by", "name"); // sort the test cases by their name
+ context.setOption("order-by", "name"); // sort the test cases by their name
context.applyCommandLine(argc, argv);
diff --git a/examples/disabled/main.cpp b/examples/disabled/main.cpp
index 1ec0723..bcff424 100644
--- a/examples/disabled/main.cpp
+++ b/examples/disabled/main.cpp
@@ -26,7 +26,7 @@
// overrides
context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
- context.setOption("order_by", "name"); // sort the test cases by their name
+ context.setOption("order-by", "name"); // sort the test cases by their name
int res = context.run(); // run
diff --git a/examples/multi_file_example/main.cpp b/examples/multi_file_example/main.cpp
index 5ecfab6..8db48b6 100644
--- a/examples/multi_file_example/main.cpp
+++ b/examples/multi_file_example/main.cpp
@@ -14,7 +14,7 @@
// overrides
context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
- context.setOption("order_by", "name"); // sort the test cases by their name
+ context.setOption("order-by", "name"); // sort the test cases by their name
int res = context.run(); // run
diff --git a/examples/separate_headers/main.cpp b/examples/separate_headers/main.cpp
index 68c0799..5da4c16 100644
--- a/examples/separate_headers/main.cpp
+++ b/examples/separate_headers/main.cpp
@@ -12,7 +12,7 @@
context.applyCommandLine(argc, argv);
// overrides
- context.setOption("order_by", "name"); // sort the test cases by their name
+ context.setOption("order-by", "name"); // sort the test cases by their name
int res = context.run(); // run
diff --git a/examples/separate_headers/test_output/separate_headers.txt b/examples/separate_headers/test_output/separate_headers.txt
index 05d55d4..df4659c 100644
--- a/examples/separate_headers/test_output/separate_headers.txt
+++ b/examples/separate_headers/test_output/separate_headers.txt
@@ -1,12 +1,73 @@
[doctest] run with "--help" for options
== TEST CASE ==================================================================
test.cpp(0)
-trololo<?>
+separate<?>
-test.cpp(0) ERROR!
- CHECK( sizeof(typename T::A) == static_cast<unsigned>(4) )
-with expansion:
- CHECK( 1 == 4 )
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<?>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<char>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<char>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<double>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<double>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<int>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<int>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<int>
+
+test.cpp(0) MESSAGE!
+ aaa
+
+== TEST CASE ==================================================================
+test.cpp(0)
+separate<int>
+
+test.cpp(0) MESSAGE!
+ aaa
== TEST CASE ==================================================================
test.cpp(0)
@@ -19,73 +80,12 @@
== TEST CASE ==================================================================
test.cpp(0)
-separate<int>
+trololo<?>
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<char>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<?>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<double>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<int>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<int>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<char>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<?>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<double>
-
-test.cpp(0) MESSAGE!
- aaa
-
-== TEST CASE ==================================================================
-test.cpp(0)
-separate<int>
-
-test.cpp(0) MESSAGE!
- aaa
+test.cpp(0) ERROR!
+ CHECK( sizeof(typename T::A) == static_cast<unsigned>(4) )
+with expansion:
+ CHECK( 1 == 4 )
===============================================================================
[doctest] test cases: 12 | 10 passed | 2 failed | 0 skipped
diff --git a/examples/user_supplied_main/main.cpp b/examples/user_supplied_main/main.cpp
index 51a46ee..c986dd6 100644
--- a/examples/user_supplied_main/main.cpp
+++ b/examples/user_supplied_main/main.cpp
@@ -11,7 +11,7 @@
// defaults
context.addFilter("test-case-exclude", "*math*"); // exclude test cases with "math" in the name
context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
- context.setOption("order_by", "name"); // sort the test cases by their name
+ context.setOption("order-by", "name"); // sort the test cases by their name
context.applyCommandLine(argc, argv);
diff --git a/scripts/code_coverage_source/main.cpp b/scripts/code_coverage_source/main.cpp
index 9ece142..bb71eca 100644
--- a/scripts/code_coverage_source/main.cpp
+++ b/scripts/code_coverage_source/main.cpp
@@ -56,7 +56,7 @@
context.addFilter("test-case-exclude", "*math*");
context.setOption("no-breaks", true);
- context.setOption("order_by", "name");
+ context.setOption("order-by", "name");
context.applyCommandLine(argc, argv);
diff --git a/scripts/code_coverage_source/test_output/abort_after.txt b/scripts/code_coverage_source/test_output/abort_after.txt
index cc8f8a4..78c19f6 100644
--- a/scripts/code_coverage_source/test_output/abort_after.txt
+++ b/scripts/code_coverage_source/test_output/abort_after.txt
@@ -1,16 +1,6 @@
[doctest] run with "--help" for options
== TEST CASE ==================================================================
test.cpp(0)
-subcases
- 2
-
-test.cpp(0) ERROR!
- CHECK( 0 )
-with expansion:
- CHECK( 0 )
-
-== TEST CASE ==================================================================
-test.cpp(0)
assertions
test.cpp(0) ERROR!
@@ -23,6 +13,11 @@
with expansion:
CHECK_FALSE( 1 )
+test.cpp(0) ERROR!
+ CHECK( a == b )
+with expansion:
+ CHECK( myType! == myType! )
+
===============================================================================
-[doctest] test cases: 5 | 3 passed | 2 failed | 2 skipped
-[doctest] assertions: 11 | 8 passed | 3 failed |
+[doctest] test cases: 1 | 0 passed | 1 failed | 6 skipped
+[doctest] assertions: 4 | 1 passed | 3 failed |
diff --git a/scripts/code_coverage_source/test_output/first_last.txt b/scripts/code_coverage_source/test_output/first_last.txt
index c3725af..45afa82 100644
--- a/scripts/code_coverage_source/test_output/first_last.txt
+++ b/scripts/code_coverage_source/test_output/first_last.txt
@@ -1,51 +1,13 @@
[doctest] run with "--help" for options
== TEST CASE ==================================================================
test.cpp(0)
-subcases
- 2
-
-test.cpp(0) ERROR!
- CHECK( 0 )
-with expansion:
- CHECK( 0 )
-
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions
-
-test.cpp(0) ERROR!
- CHECK( 1 == 0 )
-with expansion:
- CHECK( 1 == 0 )
-
-test.cpp(0) ERROR!
- CHECK_FALSE( 1 )
-with expansion:
- CHECK_FALSE( 1 )
-
-test.cpp(0) ERROR!
- CHECK( a == b )
-with expansion:
- CHECK( myType! == myType! )
-
-test.cpp(0) ERROR!
- CHECK( Approx(0.1) == 0.2 )
-with expansion:
- CHECK( Approx( 0.1 ) == 0.2 )
-
-test.cpp(0) ERROR!
- CHECK_THROWS( throws(false) )
-didn't throw at all
-
-test.cpp(0) ERROR!
- CHECK_NOTHROW( throws(true) )
-threw exception:
- unknown exception
+assertions - all of them
test.cpp(0) FATAL ERROR!
- REQUIRE_THROWS_AS( throws(false), bool )
-didn't throw at all
+ FAST_REQUIRE_UNARY_FALSE( 1 )
+with expansion:
+ FAST_REQUIRE_UNARY_FALSE( 1 )
===============================================================================
-[doctest] test cases: 7 | 5 passed | 2 failed | 0 skipped
-[doctest] assertions: 19 | 11 passed | 8 failed |
+[doctest] test cases: 7 | 6 passed | 1 failed | 0 skipped
+[doctest] assertions: 49 | 48 passed | 1 failed |
diff --git a/scripts/code_coverage_source/test_output/list_test_cases.txt b/scripts/code_coverage_source/test_output/list_test_cases.txt
index 1ebd5f3..adbdac0 100644
--- a/scripts/code_coverage_source/test_output/list_test_cases.txt
+++ b/scripts/code_coverage_source/test_output/list_test_cases.txt
@@ -1,11 +1,11 @@
[doctest] run with "--help" for options
[doctest] listing all test case names
-subcases
-doctest internals
-subcases
-expressions should be evaluated only once
assertions
assertions - all of them
+doctest internals
+expressions should be evaluated only once
+subcases
+subcases
throws
===============================================================================
[doctest] number of tests passing the current filters: 7
diff --git a/scripts/code_coverage_source/test_output/list_test_suites.txt b/scripts/code_coverage_source/test_output/list_test_suites.txt
index 63f2ba9..91f3fb2 100644
--- a/scripts/code_coverage_source/test_output/list_test_suites.txt
+++ b/scripts/code_coverage_source/test_output/list_test_suites.txt
@@ -1,6 +1,6 @@
[doctest] run with "--help" for options
[doctest] listing all test suites
-
ts1
+
===============================================================================
[doctest] number of tests passing the current filters: 7
diff --git a/scripts/code_coverage_source/test_output/successful.txt b/scripts/code_coverage_source/test_output/successful.txt
index 7345654..78a35aa 100644
--- a/scripts/code_coverage_source/test_output/successful.txt
+++ b/scripts/code_coverage_source/test_output/successful.txt
@@ -1,34 +1,6 @@
[doctest] run with "--help" for options
== TEST CASE ==================================================================
test.cpp(0)
-subcases
-
-== TEST CASE ==================================================================
-test.cpp(0)
-subcases
- 2
-
-test.cpp(0) ERROR!
- CHECK( 0 )
-with expansion:
- CHECK( 0 )
-
-== TEST CASE ==================================================================
-test.cpp(0)
-expressions should be evaluated only once
-
-test.cpp(0) PASSED!
- REQUIRE( ++a == 6 )
-with expansion:
- REQUIRE( 6 == 6 )
-
-test.cpp(0) PASSED!
- REQUIRE_EQ( ++a, 7 )
-with expansion:
- REQUIRE_EQ( 7, 7 )
-
-== TEST CASE ==================================================================
-test.cpp(0)
assertions
test.cpp(0) PASSED!
@@ -381,6 +353,34 @@
== TEST CASE ==================================================================
test.cpp(0)
+expressions should be evaluated only once
+
+test.cpp(0) PASSED!
+ REQUIRE( ++a == 6 )
+with expansion:
+ REQUIRE( 6 == 6 )
+
+test.cpp(0) PASSED!
+ REQUIRE_EQ( ++a, 7 )
+with expansion:
+ REQUIRE_EQ( 7, 7 )
+
+== TEST CASE ==================================================================
+test.cpp(0)
+subcases
+
+== TEST CASE ==================================================================
+test.cpp(0)
+subcases
+ 2
+
+test.cpp(0) ERROR!
+ CHECK( 0 )
+with expansion:
+ CHECK( 0 )
+
+== TEST CASE ==================================================================
+test.cpp(0)
throws
TEST CASE FAILED!