diff options
author | onqtam <vik.kirilov@gmail.com> | 2017-05-01 20:25:09 +0300 |
---|---|---|
committer | onqtam <vik.kirilov@gmail.com> | 2017-05-16 00:22:22 +0300 |
commit | 7630535ce91405bab07030b4912c0d584c731151 (patch) | |
tree | d45298e5a1b2f69bd240f24d7e53318e487a0410 /examples/all_features/test_output | |
parent | 321f27033414d0a3d45c6c51296121ef416d5dea (diff) |
more code coverage
Diffstat (limited to 'examples/all_features/test_output')
-rw-r--r-- | examples/all_features/test_output/all_binary_success.txt | 249 | ||||
-rw-r--r-- | examples/all_features/test_output/count.txt | 3 | ||||
-rw-r--r-- | examples/all_features/test_output/coverage_maxout.cpp.txt | 18 | ||||
-rw-r--r-- | examples/all_features/test_output/help.txt | 54 | ||||
-rw-r--r-- | examples/all_features/test_output/list_test_cases.txt | 7 | ||||
-rw-r--r-- | examples/all_features/test_output/list_test_suites.txt | 5 | ||||
-rw-r--r-- | examples/all_features/test_output/logging.cpp.txt | 12 | ||||
-rw-r--r-- | examples/all_features/test_output/order_1.txt | 43 | ||||
-rw-r--r-- | examples/all_features/test_output/order_2.txt | 43 | ||||
-rw-r--r-- | examples/all_features/test_output/order_3.txt | 5 | ||||
-rw-r--r-- | examples/all_features/test_output/version.txt | 0 |
11 files changed, 437 insertions, 2 deletions
diff --git a/examples/all_features/test_output/all_binary_success.txt b/examples/all_features/test_output/all_binary_success.txt new file mode 100644 index 00000000..19eb8b2c --- /dev/null +++ b/examples/all_features/test_output/all_binary_success.txt @@ -0,0 +1,249 @@ +[doctest] run with "--help" for options +=============================================================================== +assertion_macros.cpp(0) +TEST CASE: all binary assertions + +assertion_macros.cpp(0) PASSED! + WARN_EQ( 1, 1 ) +with expansion: + WARN_EQ( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + CHECK_EQ( 1, 1 ) +with expansion: + CHECK_EQ( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_EQ( 1, 1 ) +with expansion: + REQUIRE_EQ( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + WARN_NE( 1, 0 ) +with expansion: + WARN_NE( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + CHECK_NE( 1, 0 ) +with expansion: + CHECK_NE( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_NE( 1, 0 ) +with expansion: + REQUIRE_NE( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + WARN_GT( 1, 0 ) +with expansion: + WARN_GT( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + CHECK_GT( 1, 0 ) +with expansion: + CHECK_GT( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_GT( 1, 0 ) +with expansion: + REQUIRE_GT( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + WARN_LT( 0, 1 ) +with expansion: + WARN_LT( 0, 1 ) + +assertion_macros.cpp(0) PASSED! + CHECK_LT( 0, 1 ) +with expansion: + CHECK_LT( 0, 1 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_LT( 0, 1 ) +with expansion: + REQUIRE_LT( 0, 1 ) + +assertion_macros.cpp(0) PASSED! + WARN_GE( 1, 1 ) +with expansion: + WARN_GE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + CHECK_GE( 1, 1 ) +with expansion: + CHECK_GE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_GE( 1, 1 ) +with expansion: + REQUIRE_GE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + WARN_LE( 1, 1 ) +with expansion: + WARN_LE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + CHECK_LE( 1, 1 ) +with expansion: + CHECK_LE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_LE( 1, 1 ) +with expansion: + REQUIRE_LE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + WARN_UNARY( 1 ) +with expansion: + WARN_UNARY( 1 ) + +assertion_macros.cpp(0) PASSED! + CHECK_UNARY( 1 ) +with expansion: + CHECK_UNARY( 1 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_UNARY( 1 ) +with expansion: + REQUIRE_UNARY( 1 ) + +assertion_macros.cpp(0) PASSED! + WARN_UNARY_FALSE( 0 ) +with expansion: + WARN_UNARY_FALSE( 0 ) + +assertion_macros.cpp(0) PASSED! + CHECK_UNARY_FALSE( 0 ) +with expansion: + CHECK_UNARY_FALSE( 0 ) + +assertion_macros.cpp(0) PASSED! + REQUIRE_UNARY_FALSE( 0 ) +with expansion: + REQUIRE_UNARY_FALSE( 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_EQ( 1, 1 ) +with expansion: + FAST_WARN_EQ( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_EQ( 1, 1 ) +with expansion: + FAST_CHECK_EQ( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_EQ( 1, 1 ) +with expansion: + FAST_REQUIRE_EQ( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_NE( 1, 0 ) +with expansion: + FAST_WARN_NE( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_NE( 1, 0 ) +with expansion: + FAST_CHECK_NE( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_NE( 1, 0 ) +with expansion: + FAST_REQUIRE_NE( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_GT( 1, 0 ) +with expansion: + FAST_WARN_GT( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_GT( 1, 0 ) +with expansion: + FAST_CHECK_GT( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_GT( 1, 0 ) +with expansion: + FAST_REQUIRE_GT( 1, 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_LT( 0, 1 ) +with expansion: + FAST_WARN_LT( 0, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_LT( 0, 1 ) +with expansion: + FAST_CHECK_LT( 0, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_LT( 0, 1 ) +with expansion: + FAST_REQUIRE_LT( 0, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_GE( 1, 1 ) +with expansion: + FAST_WARN_GE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_GE( 1, 1 ) +with expansion: + FAST_CHECK_GE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_GE( 1, 1 ) +with expansion: + FAST_REQUIRE_GE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_LE( 1, 1 ) +with expansion: + FAST_WARN_LE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_LE( 1, 1 ) +with expansion: + FAST_CHECK_LE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_LE( 1, 1 ) +with expansion: + FAST_REQUIRE_LE( 1, 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_UNARY( 1 ) +with expansion: + FAST_WARN_UNARY( 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_UNARY( 1 ) +with expansion: + FAST_CHECK_UNARY( 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_UNARY( 1 ) +with expansion: + FAST_REQUIRE_UNARY( 1 ) + +assertion_macros.cpp(0) PASSED! + FAST_WARN_UNARY_FALSE( 0 ) +with expansion: + FAST_WARN_UNARY_FALSE( 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_CHECK_UNARY_FALSE( 0 ) +with expansion: + FAST_CHECK_UNARY_FALSE( 0 ) + +assertion_macros.cpp(0) PASSED! + FAST_REQUIRE_UNARY_FALSE( 0 ) +with expansion: + FAST_REQUIRE_UNARY_FALSE( 0 ) + +=============================================================================== +[doctest] test cases: 1 | 1 passed | 0 failed | +[doctest] assertions: 32 | 32 passed | 0 failed | +Program code. diff --git a/examples/all_features/test_output/count.txt b/examples/all_features/test_output/count.txt new file mode 100644 index 00000000..544b1833 --- /dev/null +++ b/examples/all_features/test_output/count.txt @@ -0,0 +1,3 @@ +[doctest] run with "--help" for options +=============================================================================== +[doctest] number of tests passing the current filters: 3 diff --git a/examples/all_features/test_output/coverage_maxout.cpp.txt b/examples/all_features/test_output/coverage_maxout.cpp.txt index e710e488..319efea7 100644 --- a/examples/all_features/test_output/coverage_maxout.cpp.txt +++ b/examples/all_features/test_output/coverage_maxout.cpp.txt @@ -1,5 +1,21 @@ [doctest] run with "--help" for options =============================================================================== -[doctest] test cases: 1 | 1 passed | 0 failed | +coverage_maxout.cpp(0) +TEST CASE: will end from a std::string exception + +TEST CASE FAILED! +threw exception: + std::string! + +=============================================================================== +coverage_maxout.cpp(0) +TEST CASE: will end from a const char* exception + +TEST CASE FAILED! +threw exception: + const char*! + +=============================================================================== +[doctest] test cases: 3 | 1 passed | 2 failed | [doctest] assertions: 5 | 5 passed | 0 failed | Program code. diff --git a/examples/all_features/test_output/help.txt b/examples/all_features/test_output/help.txt new file mode 100644 index 00000000..05600fa2 --- /dev/null +++ b/examples/all_features/test_output/help.txt @@ -0,0 +1,54 @@ +[doctest] +[doctest] boolean values: "1/on/yes/true" or "0/off/no/false" +[doctest] filter values: "str1,str2,str3" (comma separated strings) +[doctest] +[doctest] filters use wildcards for matching strings +[doctest] something passes a filter if any of the strings in a filter matches +[doctest] +[doctest] ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A "dt-" PREFIX!!! +[doctest] +[doctest] Query flags - the program quits after them. Available: + + -?, --help, -h prints this message + -v, --version prints the version + -c, --count prints the number of matching tests + -ltc, --list-test-cases lists all matching tests by name + -lts, --list-test-suites lists all matching test suites + +[doctest] The available <int>/<string> options/filters are: + + -tc, --test-case=<filters> filters tests by their name + -tce, --test-case-exclude=<filters> filters OUT tests by their name + -sf, --source-file=<filters> filters tests by their file + -sfe, --source-file-exclude=<filters> filters OUT tests by their file + -ts, --test-suite=<filters> filters tests by their test suite + -tse, --test-suite-exclude=<filters> filters OUT tests by their test suite + -sc, --subcase=<filters> filters subcases by their name + -sce, --subcase-exclude=<filters> filters OUT subcases by their name + -ob, --order-by=<string> how the tests should be ordered + <string> - by [file/suite/name/rand] + -rs, --rand-seed=<int> seed for random ordering + -f, --first=<int> the first test passing the filters to + execute - for range-based execution + -l, --last=<int> the last test passing the filters to + execute - for range-based execution + -aa, --abort-after=<int> stop after <int> failed assertions + -scfl,--subcase-filter-levels=<int> apply filters for the first <int> levels + +[doctest] Bool options - can be used like flags and true is assumed. Available: + + -s, --success=<bool> include successful assertions in output + -cs, --case-sensitive=<bool> filters being treated as case sensitive + -e, --exit=<bool> exits after the tests finish + -nt, --no-throw=<bool> skips exceptions-related assert checks + -ne, --no-exitcode=<bool> returns (or exits) always with success + -nr, --no-run=<bool> skips all runtime doctest operations + -nv, --no-version=<bool> omit the framework version in the output + -nc, --no-colors=<bool> disables colors in output + -fc, --force-colors=<bool> use colors even when not in a tty + -nb, --no-breaks=<bool> disables breakpoints in debuggers + -npf, --no-path-filenames=<bool> only filenames and no paths in output + -nln, --no-line-numbers=<bool> 0 instead of real line numbers in output + +[doctest] for more information visit the project documentation + diff --git a/examples/all_features/test_output/list_test_cases.txt b/examples/all_features/test_output/list_test_cases.txt new file mode 100644 index 00000000..2f9dc139 --- /dev/null +++ b/examples/all_features/test_output/list_test_cases.txt @@ -0,0 +1,7 @@ +[doctest] run with "--help" for options +[doctest] listing all test case names +doctest internals +will end from a std::string exception +will end from a const char* exception +=============================================================================== +[doctest] number of tests passing the current filters: 3 diff --git a/examples/all_features/test_output/list_test_suites.txt b/examples/all_features/test_output/list_test_suites.txt new file mode 100644 index 00000000..540b37b5 --- /dev/null +++ b/examples/all_features/test_output/list_test_suites.txt @@ -0,0 +1,5 @@ +[doctest] run with "--help" for options +[doctest] listing all test suites + +=============================================================================== +[doctest] number of tests passing the current filters: 3 diff --git a/examples/all_features/test_output/logging.cpp.txt b/examples/all_features/test_output/logging.cpp.txt index 72e342f6..2fe5fce9 100644 --- a/examples/all_features/test_output/logging.cpp.txt +++ b/examples/all_features/test_output/logging.cpp.txt @@ -68,6 +68,16 @@ threw exception: =============================================================================== logging.cpp(0) +TEST CASE: a test case that will end from an exception and should print the unprinted context + +TEST CASE FAILED! +threw exception: + 0 +with context: + should be printed even if an exception is thrown and no assert fails before that + +=============================================================================== +logging.cpp(0) TEST CASE: third party asserts can report failures to doctest logging.cpp(0) ERROR! @@ -94,6 +104,6 @@ logging.cpp(0) FATAL ERROR! fail the test case and also end it =============================================================================== -[doctest] test cases: 5 | 0 passed | 5 failed | +[doctest] test cases: 6 | 0 passed | 6 failed | [doctest] assertions: 6 | 0 passed | 6 failed | Program code. diff --git a/examples/all_features/test_output/order_1.txt b/examples/all_features/test_output/order_1.txt new file mode 100644 index 00000000..9f306699 --- /dev/null +++ b/examples/all_features/test_output/order_1.txt @@ -0,0 +1,43 @@ +[doctest] run with "--help" for options +=============================================================================== +test_cases_and_suites.cpp(0) +TEST CASE: should fail because of an exception + +TEST CASE FAILED! +threw exception: + 0 + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST CASE: fixtured test - not part of a test suite + +test_cases_and_suites.cpp(0) ERROR! + CHECK( data == 85 ) +with expansion: + CHECK( 21 == 85 ) + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST SUITE: scoped test suite +TEST CASE: part of scoped + +test_cases_and_suites.cpp(0) FATAL ERROR! + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST SUITE: scoped test suite +TEST CASE: part of scoped 2 + +test_cases_and_suites.cpp(0) FATAL ERROR! + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST SUITE: some TS +TEST CASE: part of some TS + +test_cases_and_suites.cpp(0) FATAL ERROR! + +=============================================================================== +[doctest] test cases: 6 | 1 passed | 5 failed | +[doctest] assertions: 2 | 1 passed | 1 failed | +Program code. diff --git a/examples/all_features/test_output/order_2.txt b/examples/all_features/test_output/order_2.txt new file mode 100644 index 00000000..8df1a21e --- /dev/null +++ b/examples/all_features/test_output/order_2.txt @@ -0,0 +1,43 @@ +[doctest] run with "--help" for options +=============================================================================== +test_cases_and_suites.cpp(0) +TEST CASE: fixtured test - not part of a test suite + +test_cases_and_suites.cpp(0) ERROR! + CHECK( data == 85 ) +with expansion: + CHECK( 21 == 85 ) + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST SUITE: scoped test suite +TEST CASE: part of scoped + +test_cases_and_suites.cpp(0) FATAL ERROR! + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST SUITE: scoped test suite +TEST CASE: part of scoped 2 + +test_cases_and_suites.cpp(0) FATAL ERROR! + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST SUITE: some TS +TEST CASE: part of some TS + +test_cases_and_suites.cpp(0) FATAL ERROR! + +=============================================================================== +test_cases_and_suites.cpp(0) +TEST CASE: should fail because of an exception + +TEST CASE FAILED! +threw exception: + 0 + +=============================================================================== +[doctest] test cases: 6 | 1 passed | 5 failed | +[doctest] assertions: 2 | 1 passed | 1 failed | +Program code. diff --git a/examples/all_features/test_output/order_3.txt b/examples/all_features/test_output/order_3.txt new file mode 100644 index 00000000..eca69f05 --- /dev/null +++ b/examples/all_features/test_output/order_3.txt @@ -0,0 +1,5 @@ +[doctest] run with "--help" for options +=============================================================================== +[doctest] test cases: 0 | 0 passed | 0 failed | +[doctest] assertions: 0 | 0 passed | 0 failed | +Program code. diff --git a/examples/all_features/test_output/version.txt b/examples/all_features/test_output/version.txt new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/examples/all_features/test_output/version.txt |