cleaning up examples
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7b8434..ccd9f2d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@
if(${DOCTEST_WITH_TESTS})
include(scripts/cmake/common.cmake)
-
+
# setup coverage stuff only when COVERALLS_SERVICE_NAME is set (usually on travis CI)
if(DEFINED ENV{COVERALLS_SERVICE_NAME})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/coveralls-cmake/cmake)
@@ -27,13 +27,11 @@
coveralls_setup("${CMAKE_CURRENT_SOURCE_DIR}/doctest/doctest.h" ON "${CMAKE_CURRENT_SOURCE_DIR}/scripts/coveralls-cmake/cmake")
- add_subdirectory(scripts/code_coverage_source)
+ add_subdirectory(examples/all_features)
return()
endif()
-
- add_subdirectory(scripts/code_coverage_source)
-
+
file(GLOB subdir_list "${CMAKE_CURRENT_SOURCE_DIR}/examples/*")
foreach(dir ${subdir_list})
if(IS_DIRECTORY ${dir})
diff --git a/examples/all_features/CMakeLists.txt b/examples/all_features/CMakeLists.txt
new file mode 100644
index 0000000..c503634
--- /dev/null
+++ b/examples/all_features/CMakeLists.txt
@@ -0,0 +1,45 @@
+get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+project(${PROJECT_NAME})
+
+set(files
+ main.cpp
+ coverage_maxout.cpp
+ alternative_macros.cpp
+ assertion_macros.cpp
+ stringification.cpp
+ subcases.cpp
+)
+
+doctest_add_executable(${PROJECT_NAME} ${files})
+target_link_libraries(${PROJECT_NAME} doctest)
+
+# add variation of the build with disabled tests - should still compile
+doctest_add_executable(${PROJECT_NAME}_disabled ${files})
+target_compile_definitions(trie_io_test PRIVATE DOCTEST_CONFIG_DISABLE)
+doctest_add_test(NAME ${PROJECT_NAME}.disabled COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
+
+# add per-file tests
+foreach(f ${files})
+ doctest_add_test(NAME ${PROJECT_NAME}.${f} COMMAND $<TARGET_FILE:${PROJECT_NAME}> --source-file=*${f})
+endforeach()
+
+## queries
+#doctest_add_test(NAME help COMMAND $<TARGET_FILE:${PROJECT_NAME}> -dt-h)
+#doctest_add_test(NAME version COMMAND $<TARGET_FILE:${PROJECT_NAME}> -v)
+#doctest_add_test(NAME count COMMAND $<TARGET_FILE:${PROJECT_NAME}> -c)
+#doctest_add_test(NAME list_test_cases COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ltc)
+#doctest_add_test(NAME list_test_suites COMMAND $<TARGET_FILE:${PROJECT_NAME}> -lts)
+#
+## options
+#doctest_add_test(NAME successful COMMAND $<TARGET_FILE:${PROJECT_NAME}> -s=true -e=Off -sfe=*main*) # exclude main because of RawMemoryToStr
+#doctest_add_test(NAME abort_after COMMAND $<TARGET_FILE:${PROJECT_NAME}> -aa=3 -no-colors)
+#doctest_add_test(NAME first_last COMMAND $<TARGET_FILE:${PROJECT_NAME}> -f=2 -l=5)
+#doctest_add_test(NAME filter_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tc=assert*********)
+#doctest_add_test(NAME filter_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tce=???ert*)
+#doctest_add_test(NAME filter_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sf=asgghdgsa)
+#doctest_add_test(NAME filter_4 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sfe=*test.cpp*)
+#doctest_add_test(NAME filter_5 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ts=ts1)
+#doctest_add_test(NAME filter_6 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tse=ts1)
+#doctest_add_test(NAME order_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=suite)
+#doctest_add_test(NAME order_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=name)
+#doctest_add_test(NAME order_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=rand -rs=324 -sfe=*) # sfe=* to exclude all tests for no output
diff --git a/examples/alternative_macros/main.cpp b/examples/all_features/alternative_macros.cpp
similarity index 89%
rename from examples/alternative_macros/main.cpp
rename to examples/all_features/alternative_macros.cpp
index 9b597f9..1c5d875 100644
--- a/examples/alternative_macros/main.cpp
+++ b/examples/all_features/alternative_macros.cpp
@@ -1,4 +1,3 @@
-#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest_proxy.h"
#include <cstdio>
diff --git a/examples/assertion_macros/main.cpp b/examples/all_features/assertion_macros.cpp
similarity index 97%
rename from examples/assertion_macros/main.cpp
rename to examples/all_features/assertion_macros.cpp
index dd37daf..9e44a0e 100644
--- a/examples/assertion_macros/main.cpp
+++ b/examples/all_features/assertion_macros.cpp
@@ -1,4 +1,3 @@
-#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
template<typename T>
diff --git a/scripts/code_coverage_source/test.cpp b/examples/all_features/coverage_maxout.cpp
similarity index 70%
rename from scripts/code_coverage_source/test.cpp
rename to examples/all_features/coverage_maxout.cpp
index 09187ff..c51574c 100644
--- a/scripts/code_coverage_source/test.cpp
+++ b/examples/all_features/coverage_maxout.cpp
@@ -2,14 +2,34 @@
#include <ostream>
-// intentionally here so there are subcases on the same lines in different files
-TEST_CASE("subcases") {
- SUBCASE("1") {
- SUBCASE("1.1") {}
- SUBCASE("1.2") {}
- }
- SUBCASE("2") { CHECK(0); }
- SUBCASE("3") {}
+TEST_CASE("doctest internals") {
+ // string stuff
+ doctest::String a(0);
+ const doctest::String const_str("omgomgomg");
+ a = const_str.c_str();
+ CHECK(a.size() == const_str.size());
+ CHECK(a.length() == const_str.length());
+ CHECK(a.compare(const_str, true) == 0);
+ CHECK(a.compare("omgomgomg", false) == 0);
+
+ // toString
+ a += toString("aaa") + toString(0.5f) + toString('c') + toString(true) +
+ toString(static_cast<long double>(0.1)) //
+ + toString(static_cast<unsigned char>(1)) //
+ + toString(static_cast<short>(1)) //
+ + toString(static_cast<long>(1)) //
+ + toString(static_cast<unsigned long>(1)) //
+ + toString(static_cast<unsigned short>(1));
+
+ // others
+ a += doctest::detail::fileForOutput("c:\\a");
+ a += doctest::detail::fileForOutput("c:/a");
+ a += doctest::detail::fileForOutput("a");
+ std::ostringstream oss;
+ oss << a;
+ oss << doctest::detail::getAssertString(static_cast<doctest::detail::assertType::Enum>(3));
+ a += oss.str().c_str();
+ CHECK(doctest::detail::rawMemoryToString(a).length() > 0u);
}
TEST_SUITE_BEGIN("ts1");
diff --git a/examples/alternative_macros/doctest_proxy.h b/examples/all_features/doctest_proxy.h
similarity index 100%
rename from examples/alternative_macros/doctest_proxy.h
rename to examples/all_features/doctest_proxy.h
diff --git a/examples/user_supplied_main/main.cpp b/examples/all_features/main.cpp
similarity index 100%
rename from examples/user_supplied_main/main.cpp
rename to examples/all_features/main.cpp
diff --git a/examples/stringification/main.cpp b/examples/all_features/stringification.cpp
similarity index 98%
rename from examples/stringification/main.cpp
rename to examples/all_features/stringification.cpp
index 05c6488..4bafa99 100644
--- a/examples/stringification/main.cpp
+++ b/examples/all_features/stringification.cpp
@@ -1,4 +1,3 @@
-#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include <string>
diff --git a/examples/subcases_and_bdd/main.cpp b/examples/all_features/subcases.cpp
similarity index 97%
rename from examples/subcases_and_bdd/main.cpp
rename to examples/all_features/subcases.cpp
index 6598d6e..9a66397 100644
--- a/examples/subcases_and_bdd/main.cpp
+++ b/examples/all_features/subcases.cpp
@@ -1,4 +1,3 @@
-#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include <iostream>
diff --git a/examples/alternative_macros/CMakeLists.txt b/examples/alternative_macros/CMakeLists.txt
deleted file mode 100644
index 00c4656..0000000
--- a/examples/alternative_macros/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/alternative_macros/test_output/alternative_macros.txt b/examples/alternative_macros/test_output/alternative_macros.txt
deleted file mode 100644
index 4252001..0000000
--- a/examples/alternative_macros/test_output/alternative_macros.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-[doctest] run with "--help" for options
-Hello world!
-Hello world!
-===============================================================================
-[doctest] test cases: 1 | 1 passed | 0 failed | 0 skipped
-[doctest] assertions: 6 | 6 passed | 0 failed |
diff --git a/examples/assertion_macros/CMakeLists.txt b/examples/assertion_macros/CMakeLists.txt
deleted file mode 100644
index 00c4656..0000000
--- a/examples/assertion_macros/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/assertion_macros/test_output/assertion_macros.txt b/examples/assertion_macros/test_output/assertion_macros.txt
deleted file mode 100644
index 81e184a..0000000
--- a/examples/assertion_macros/test_output/assertion_macros.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-main.cpp(0)
-an empty test that will fail because of an exception
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-== TEST CASE ==================================================================
-main.cpp(0)
-an empty test that will fail because of a std::exception
-
-TEST CASE FAILED!
-threw exception:
- whops!
-
-== TEST CASE ==================================================================
-main.cpp(0)
-normal macros
-
-main.cpp(0) ERROR!
- CHECK( conditional_throw(true, std::runtime_error("whops!")) == 42 )
-threw exception:
- whops!
-
-main.cpp(0) ERROR!
- CHECK( Approx(0.502) == 0.501 )
-with expansion:
- CHECK( Approx( 0.502 ) == 0.501 )
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-== TEST CASE ==================================================================
-main.cpp(0)
-normal macros with std::exception
-
-main.cpp(0) ERROR!
- CHECK( conditional_throw(true, 0) == 42 )
-threw exception:
- unknown exception
-
-main.cpp(0) ERROR!
- CHECK( Approx(0.502) == 0.501 )
-with expansion:
- CHECK( Approx( 0.502 ) == 0.501 )
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-== TEST CASE ==================================================================
-main.cpp(0)
-exceptions-related macros
-
-main.cpp(0) ERROR!
- CHECK_THROWS( conditional_throw(false, 0) )
-didn't throw at all
-
-main.cpp(0) ERROR!
- CHECK_THROWS_AS( conditional_throw(false, 0), int )
-didn't throw at all
-
-main.cpp(0) ERROR!
- CHECK_THROWS_AS( conditional_throw(true, 0), char )
-threw a different exception:
- unknown exception
-
-main.cpp(0) ERROR!
- CHECK_NOTHROW( conditional_throw(true, 0) )
-threw exception:
- unknown exception
-
-== TEST CASE ==================================================================
-main.cpp(0)
-exceptions-related macros for std::exception
-
-main.cpp(0) ERROR!
- CHECK_THROWS( conditional_throw(false, 0) )
-didn't throw at all
-
-main.cpp(0) ERROR!
- CHECK_THROWS_AS( conditional_throw(false, std::runtime_error("whops!")), std::exception )
-didn't throw at all
-
-main.cpp(0) ERROR!
- CHECK_THROWS_AS( conditional_throw(true, std::runtime_error("whops!")), int )
-threw a different exception:
- whops!
-
-main.cpp(0) FATAL ERROR!
- REQUIRE_NOTHROW( conditional_throw(true, std::runtime_error("whops!")) )
-threw exception:
- whops!
-
-===============================================================================
-[doctest] test cases: 7 | 1 passed | 6 failed | 0 skipped
-[doctest] assertions: 24 | 12 passed | 12 failed |
diff --git a/examples/disabled/CMakeLists.txt b/examples/disabled/CMakeLists.txt
deleted file mode 100644
index ad68f65..0000000
--- a/examples/disabled/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp test.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/disabled/main.cpp b/examples/disabled/main.cpp
deleted file mode 100644
index bcff424..0000000
--- a/examples/disabled/main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#define DOCTEST_CONFIG_DISABLE
-
-#define DOCTEST_CONFIG_IMPLEMENT
-#include "doctest.h"
-
-// set an exception translator for double - as a reference
-REGISTER_EXCEPTION_TRANSLATOR(double& e) {
- return doctest::String("double: ") + doctest::toString(e);
-}
-
-static doctest::String intTranslator(int ex) { return doctest::String("int: ") + doctest::toString(ex); }
-
-int main(int argc, char** argv) {
- // set an exception translator for int
- doctest::registerExceptionTranslator(intTranslator);
-
- doctest::Context context;
-
- // !!! THIS IS JUST AN EXAMPLE SHOWING HOW DEFAULTS/OVERRIDES ARE SET !!!
-
- // defaults
- context.addFilter("test-case-exclude", "*math*"); // exclude test cases with "math" in the name
- context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
-
- context.applyCommandLine(argc, argv);
-
- // 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
-
- int res = context.run(); // run
-
- if(context.shouldExit()) // important - query flags (and --exit) rely on the user doing this
- return res; // propagate the result of the tests
-
- int client_stuff_return_code = 0;
- // your program - if the testing framework is integrated in your production code
-
- return res + client_stuff_return_code; // the result from doctest is propagated here as well
-}
diff --git a/examples/disabled/test.cpp b/examples/disabled/test.cpp
deleted file mode 100644
index 9c25bcb..0000000
--- a/examples/disabled/test.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-#define DOCTEST_CONFIG_DISABLE
-
-#include "doctest.h"
-
-#ifdef _MSC_VER
-#pragma warning(disable : 4505) // unreferenced local functions being removed
-#endif // _MSC_VER
-
-#ifdef __clang__
-#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
-#endif // __clang__
-
-using doctest::Approx;
-
-static int throws(bool in) {
- if(in)
-#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS
- throw "whops!";
-#else // DOCTEST_CONFIG_NO_EXCEPTIONS
- return 0;
-#endif // DOCTEST_CONFIG_NO_EXCEPTIONS
- return 42;
-}
-
-TEST_SUITE_BEGIN("the testsuite!");
-
-#define DO_STUFF() \
- CHECK(1 == 0); \
- CHECK_FALSE(1 == 0); \
- CHECK(Approx(0.502) == 0.501); \
- CHECK(1 == 1); \
- REQUIRE(1 == 1); \
- CHECK_FALSE(0); \
- REQUIRE_FALSE(0); \
- CHECK_THROWS(throws(true)); \
- REQUIRE_THROWS(throws(true)); \
- CHECK_THROWS_AS(throws(true), int); \
- REQUIRE_THROWS_AS(throws(true), char); \
- CHECK_NOTHROW(throws(false)); \
- REQUIRE_NOTHROW(throws(false)); \
- SUBCASE("") {}
-
-// in a separate function because the TEST_CASE() macro will expand to an uninstantiated template
-// and we want to ensure this code is parsed (MSVC will not if it is in an uninstantiated template)
-static void f() { DO_STUFF(); }
-
-TEST_CASE("ops") {
- f();
-
- throws(false);
-
- DO_STUFF();
-}
-
-TEST_SUITE_END();
-
-// to silence GCC warnings when inheriting from the class TheFixture which has no virtual destructor
-#if defined(__GNUC__) && !defined(__clang__)
-#pragma GCC diagnostic ignored "-Weffc++"
-#endif // __GNUC__
-
-struct TheFixture
-{
- int data;
- TheFixture()
- : data(42) {
- // setup here
- }
-
- ~TheFixture() {
- // teardown here
- }
-};
-
-TEST_SUITE("the testsuite!") {
- TEST_CASE_FIXTURE(TheFixture, "test with a fixture - 1") {
- data /= 2;
- CHECK(data == 21);
- }
-}
diff --git a/examples/disabled/test_output/disabled.txt b/examples/disabled/test_output/disabled.txt
deleted file mode 100644
index e69de29..0000000
--- a/examples/disabled/test_output/disabled.txt
+++ /dev/null
diff --git a/examples/dll_and_executable/CMakeLists.txt b/examples/executable_dll_and_plugin/CMakeLists.txt
similarity index 100%
rename from examples/dll_and_executable/CMakeLists.txt
rename to examples/executable_dll_and_plugin/CMakeLists.txt
diff --git a/examples/dll_and_executable/dll.cpp b/examples/executable_dll_and_plugin/dll.cpp
similarity index 100%
rename from examples/dll_and_executable/dll.cpp
rename to examples/executable_dll_and_plugin/dll.cpp
diff --git a/examples/dll_and_executable/implementation.cpp b/examples/executable_dll_and_plugin/implementation.cpp
similarity index 100%
rename from examples/dll_and_executable/implementation.cpp
rename to examples/executable_dll_and_plugin/implementation.cpp
diff --git a/examples/dll_and_executable/implementation_2.cpp b/examples/executable_dll_and_plugin/implementation_2.cpp
similarity index 100%
rename from examples/dll_and_executable/implementation_2.cpp
rename to examples/executable_dll_and_plugin/implementation_2.cpp
diff --git a/examples/dll_and_executable/main.cpp b/examples/executable_dll_and_plugin/main.cpp
similarity index 100%
rename from examples/dll_and_executable/main.cpp
rename to examples/executable_dll_and_plugin/main.cpp
diff --git a/examples/dll_and_executable/plugin.cpp b/examples/executable_dll_and_plugin/plugin.cpp
similarity index 100%
rename from examples/dll_and_executable/plugin.cpp
rename to examples/executable_dll_and_plugin/plugin.cpp
diff --git a/examples/dll_and_executable/test_output/dll_and_executable.txt b/examples/executable_dll_and_plugin/test_output/dll_and_executable.txt
similarity index 100%
rename from examples/dll_and_executable/test_output/dll_and_executable.txt
rename to examples/executable_dll_and_plugin/test_output/dll_and_executable.txt
diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt
deleted file mode 100644
index 00c4656..0000000
--- a/examples/hello_world/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/hello_world/main.cpp b/examples/hello_world/main.cpp
deleted file mode 100644
index 496e709..0000000
--- a/examples/hello_world/main.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
-#include "doctest.h"
-
-static int factorial(int number) { return number <= 1 ? number : factorial(number - 1) * number; }
-
-TEST_CASE("testing the factorial function") {
- CHECK(factorial(0) == 1);
- CHECK(factorial(1) == 1);
- CHECK(factorial(2) == 2);
- CHECK(factorial(3) == 6);
- CHECK(factorial(10) == 3628800);
-}
diff --git a/examples/hello_world/test_output/hello_world.txt b/examples/hello_world/test_output/hello_world.txt
deleted file mode 100644
index a63fa43..0000000
--- a/examples/hello_world/test_output/hello_world.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-main.cpp(0)
-testing the factorial function
-
-main.cpp(0) ERROR!
- CHECK( factorial(0) == 1 )
-with expansion:
- CHECK( 0 == 1 )
-
-===============================================================================
-[doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped
-[doctest] assertions: 5 | 4 passed | 1 failed |
diff --git a/examples/multi_file_example/CMakeLists.txt b/examples/multi_file_example/CMakeLists.txt
deleted file mode 100644
index 670f4d2..0000000
--- a/examples/multi_file_example/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp f1.cpp f2.cpp hdr.h)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/multi_file_example/f1.cpp b/examples/multi_file_example/f1.cpp
deleted file mode 100644
index 0e7a091..0000000
--- a/examples/multi_file_example/f1.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "hdr.h"
-
-TEST_CASE("f1.cpp") {
- CHECK(1 == 0);
-}
diff --git a/examples/multi_file_example/f2.cpp b/examples/multi_file_example/f2.cpp
deleted file mode 100644
index fdb5838..0000000
--- a/examples/multi_file_example/f2.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "hdr.h"
-
-TEST_CASE("f2.cpp") {
- CHECK(1 == 0);
-}
diff --git a/examples/multi_file_example/hdr.h b/examples/multi_file_example/hdr.h
deleted file mode 100644
index fce9832..0000000
--- a/examples/multi_file_example/hdr.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#include "doctest.h"
-
-// this test will be registered only once even though it is in a header file
-TEST_CASE("hdr.h") {
- CHECK(1 == 0);
-}
-
diff --git a/examples/multi_file_example/main.cpp b/examples/multi_file_example/main.cpp
deleted file mode 100644
index 8db48b6..0000000
--- a/examples/multi_file_example/main.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#define DOCTEST_CONFIG_IMPLEMENT
-#include "doctest.h"
-
-int main(int argc, char** argv) {
- doctest::Context context;
-
- // !!! THIS IS JUST AN EXAMPLE SHOWING HOW DEFAULTS/OVERRIDES ARE SET !!!
-
- // defaults
- context.addFilter("test-case-exclude", "*math*"); // exclude test cases with "math" in their name
- context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
-
- context.applyCommandLine(argc, argv);
-
- // 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
-
- int res = context.run(); // run
-
- if(context.shouldExit()) // important - query flags (and --exit) rely on the user doing this
- return res; // propagate the result of the tests
-
- int client_stuff_return_code = 0;
- // your program - if the testing framework is integrated in your production code
-
- return res + client_stuff_return_code; // the result from doctest is propagated here as well
-}
diff --git a/examples/multi_file_example/test_output/multi_file_example.txt b/examples/multi_file_example/test_output/multi_file_example.txt
deleted file mode 100644
index 390ddce..0000000
--- a/examples/multi_file_example/test_output/multi_file_example.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-f1.cpp(0)
-f1.cpp
-
-f1.cpp(0) ERROR!
- CHECK( 1 == 0 )
-with expansion:
- CHECK( 1 == 0 )
-
-== TEST CASE ==================================================================
-f2.cpp(0)
-f2.cpp
-
-f2.cpp(0) ERROR!
- CHECK( 1 == 0 )
-with expansion:
- CHECK( 1 == 0 )
-
-== TEST CASE ==================================================================
-hdr.h(0)
-hdr.h
-
-hdr.h(0) ERROR!
- CHECK( 1 == 0 )
-with expansion:
- CHECK( 1 == 0 )
-
-===============================================================================
-[doctest] test cases: 3 | 0 passed | 3 failed | 0 skipped
-[doctest] assertions: 3 | 0 passed | 3 failed |
diff --git a/examples/separate_headers/CMakeLists.txt b/examples/separate_headers/CMakeLists.txt
deleted file mode 100644
index ad68f65..0000000
--- a/examples/separate_headers/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp test.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/separate_headers/main.cpp b/examples/separate_headers/main.cpp
deleted file mode 100644
index 5da4c16..0000000
--- a/examples/separate_headers/main.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "parts/doctest_impl.h"
-
-int main(int argc, char** argv) {
- doctest::Context context;
-
- // !!! THIS IS JUST AN EXAMPLE SHOWING HOW DEFAULTS/OVERRIDES ARE SET !!!
-
- // defaults
- context.addFilter("test-case-exclude", "*math*"); // exclude test cases with "math" in the name
- context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
-
- context.applyCommandLine(argc, argv);
-
- // overrides
- context.setOption("order-by", "name"); // sort the test cases by their name
-
- int res = context.run(); // run
-
- if(context.shouldExit()) // important - query flags (and --exit) rely on the user doing this
- return res; // propagate the result of the tests
-
- int client_stuff_return_code = 0;
- // your program - if the testing framework is integrated in your production code
-
-#ifdef WITH_PAUSE
- system("pause");
-#endif // WITH_PAUSE
-
- return res + client_stuff_return_code; // the result from doctest is propagated here as well
-}
diff --git a/examples/separate_headers/test.cpp b/examples/separate_headers/test.cpp
deleted file mode 100644
index c19579c..0000000
--- a/examples/separate_headers/test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "parts/doctest_fwd.h"
-
-#include <iostream>
-using namespace std;
-
-//static int throws(bool in) { if(in) throw 42; return 0; }
-
-TEST_CASE("dev stuff") {
- CHECK(4 == 5);
- //CHECK_THROWS(CHECK_THROWS(4 == 5));
- //CHECK_THROWS({throws(true);});
-}
diff --git a/examples/separate_headers/test_output/separate_headers.txt b/examples/separate_headers/test_output/separate_headers.txt
deleted file mode 100644
index 0266018..0000000
--- a/examples/separate_headers/test_output/separate_headers.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-test.cpp(0)
-dev stuff
-
-test.cpp(0) ERROR!
- CHECK( 4 == 5 )
-with expansion:
- CHECK( 4 == 5 )
-
-===============================================================================
-[doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped
-[doctest] assertions: 1 | 0 passed | 1 failed |
diff --git a/examples/stringification/CMakeLists.txt b/examples/stringification/CMakeLists.txt
deleted file mode 100644
index 00c4656..0000000
--- a/examples/stringification/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/stringification/test_output/stringification.txt b/examples/stringification/test_output/stringification.txt
deleted file mode 100644
index dc7cb1d..0000000
--- a/examples/stringification/test_output/stringification.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-main.cpp(0)
-the only test
-
-main.cpp(0) ERROR!
- CHECK( f1 == f2 )
-with expansion:
- CHECK( Foo{} == Foo{} )
-
-main.cpp(0) ERROR!
- CHECK( dummy1 == dummy2 )
-with expansion:
- CHECK( omg == tralala )
-
-main.cpp(0) ERROR!
- CHECK( vec1 == vec2 )
-with expansion:
- CHECK( [1, 2, 3] == [1, 2, 4] )
-
-main.cpp(0) ERROR!
- CHECK( lst_1 == lst_2 )
-with expansion:
- CHECK( [1, 42, 3, ] == [1, 2, 666, ] )
-
-TEST CASE FAILED!
-threw exception:
- MyTypeInherited<int>(5, 4.0f)
-
-== TEST CASE ==================================================================
-main.cpp(0)
-a test case that registers an exception translator for int and then throws one
-
-TEST CASE FAILED!
-threw exception:
- int: 5
-
-===============================================================================
-[doctest] test cases: 2 | 0 passed | 2 failed | 0 skipped
-[doctest] assertions: 4 | 0 passed | 4 failed |
diff --git a/examples/subcases_and_bdd/CMakeLists.txt b/examples/subcases_and_bdd/CMakeLists.txt
deleted file mode 100644
index 00c4656..0000000
--- a/examples/subcases_and_bdd/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/subcases_and_bdd/test_output/subcases_and_bdd.txt b/examples/subcases_and_bdd/test_output/subcases_and_bdd.txt
deleted file mode 100644
index c3af1a6..0000000
--- a/examples/subcases_and_bdd/test_output/subcases_and_bdd.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-[doctest] run with "--help" for options
-
-root
-1
-1.1
-
-root
-2
-2.1
-
-root
-2
-== TEST CASE ==================================================================
-main.cpp(0)
-lots of nested subcases
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-== TEST CASE ==================================================================
-main.cpp(0)
- Scenario: vectors can be sized and resized
- Given: A vector with some items
- When: the size is increased
- Then: the size and capacity change
-
-main.cpp(0) ERROR!
- CHECK( v.size() == 20 )
-with expansion:
- CHECK( 10 == 20 )
-
-== TEST CASE ==================================================================
-main.cpp(0)
- Scenario: vectors can be sized and resized
- Given: A vector with some items
- When: less capacity is reserved
- Then: neither size nor capacity are changed
-
-main.cpp(0) ERROR!
- CHECK( v.size() == 10 )
-with expansion:
- CHECK( 5 == 10 )
-
-== TEST CASE ==================================================================
-main.cpp(0)
-test with a fixture - 2
-
-main.cpp(0) ERROR!
- CHECK( data == 85 )
-with expansion:
- CHECK( 84 == 85 )
-
-===============================================================================
-[doctest] test cases: 4 | 1 passed | 3 failed | 0 skipped
-[doctest] assertions: 18 | 15 passed | 3 failed |
diff --git a/examples/user_supplied_main/CMakeLists.txt b/examples/user_supplied_main/CMakeLists.txt
deleted file mode 100644
index 00c4656..0000000
--- a/examples/user_supplied_main/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/examples/user_supplied_main/test_output/user_supplied_main.txt b/examples/user_supplied_main/test_output/user_supplied_main.txt
deleted file mode 100644
index eabbc88..0000000
--- a/examples/user_supplied_main/test_output/user_supplied_main.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-[doctest] run with "--help" for options
-===============================================================================
-[doctest] test cases: 1 | 1 passed | 0 failed | 1 skipped
-[doctest] assertions: 1 | 1 passed | 0 failed |
-Program code.
diff --git a/scripts/code_coverage_source/CMakeLists.txt b/scripts/code_coverage_source/CMakeLists.txt
deleted file mode 100644
index d7eaf2f..0000000
--- a/scripts/code_coverage_source/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-
-get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-project(${PROJECT_NAME})
-
-doctest_add_executable(${PROJECT_NAME} main.cpp test.cpp)
-target_link_libraries(${PROJECT_NAME} doctest)
-
-# queries
-doctest_add_test(NAME help COMMAND $<TARGET_FILE:${PROJECT_NAME}> -dt-h)
-doctest_add_test(NAME version COMMAND $<TARGET_FILE:${PROJECT_NAME}> -v)
-doctest_add_test(NAME count COMMAND $<TARGET_FILE:${PROJECT_NAME}> -c)
-doctest_add_test(NAME list_test_cases COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ltc)
-doctest_add_test(NAME list_test_suites COMMAND $<TARGET_FILE:${PROJECT_NAME}> -lts)
-
-# options
-doctest_add_test(NAME successful COMMAND $<TARGET_FILE:${PROJECT_NAME}> -s=true -e=Off -sfe=*main*) # exclude main because of RawMemoryToStr
-doctest_add_test(NAME abort_after COMMAND $<TARGET_FILE:${PROJECT_NAME}> -aa=3 -no-colors)
-doctest_add_test(NAME first_last COMMAND $<TARGET_FILE:${PROJECT_NAME}> -f=2 -l=5)
-doctest_add_test(NAME filter_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tc=assert*********)
-doctest_add_test(NAME filter_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tce=???ert*)
-doctest_add_test(NAME filter_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sf=asgghdgsa)
-doctest_add_test(NAME filter_4 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sfe=*test.cpp*)
-doctest_add_test(NAME filter_5 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ts=ts1)
-doctest_add_test(NAME filter_6 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tse=ts1)
-doctest_add_test(NAME order_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=suite)
-doctest_add_test(NAME order_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=name)
-doctest_add_test(NAME order_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=rand -rs=324 -sfe=*) # sfe=* to exclude all tests for no output
diff --git a/scripts/code_coverage_source/main.cpp b/scripts/code_coverage_source/main.cpp
deleted file mode 100644
index bb71eca..0000000
--- a/scripts/code_coverage_source/main.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#define DOCTEST_CONFIG_COLORS_NONE // the easy way to fix code coverage
-#define DOCTEST_CONFIG_IMPLEMENT
-#include "doctest.h"
-
-// intentionally here so there are subcases on the same lines in different files
-TEST_CASE("subcases") {
- SUBCASE("1") {
- SUBCASE("1.1") {}
- SUBCASE("1.2") {}
- SUBCASE("1.2") {}
- }
- // clang-format off
- SUBCASE("2") {} SUBCASE("3") {} // to have subcases on the same line with different names
- // clang-format on
-}
-
-using doctest::toString;
-
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)
-#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
-#endif // > gcc 4.6
-
-TEST_CASE("doctest internals") {
- // string stuff
- doctest::String a(0);
- const doctest::String const_str("omgomgomg");
- a = const_str.c_str();
- CHECK(a.size() == const_str.size());
- CHECK(a.length() == const_str.length());
- CHECK(a.compare(const_str, true) == 0);
- CHECK(a.compare("omgomgomg", false) == 0);
-
- // toString
- a += toString("aaa") + toString(0.5f) + toString('c') + toString(true) +
- toString(static_cast<long double>(0.1)) //
- + toString(static_cast<unsigned char>(1)) //
- + toString(static_cast<short>(1)) //
- + toString(static_cast<long>(1)) //
- + toString(static_cast<unsigned long>(1)) //
- + toString(static_cast<unsigned short>(1));
-
- // others
- a += doctest::detail::fileForOutput("c:\\a");
- a += doctest::detail::fileForOutput("c:/a");
- a += doctest::detail::fileForOutput("a");
- std::ostringstream oss;
- oss << a;
- oss << doctest::detail::getAssertString(static_cast<doctest::detail::assertType::Enum>(3));
- a += oss.str().c_str();
- CHECK(doctest::detail::rawMemoryToString(a).length() > 0u);
-}
-
-int main(int argc, char** argv) {
- doctest::Context context;
- context.clearFilters();
-
- context.addFilter("test-case-exclude", "*math*");
- context.setOption("no-breaks", true);
- context.setOption("order-by", "name");
-
- context.applyCommandLine(argc, argv);
-
- int res = context.run();
-
- if(context.shouldExit())
- return res;
-
- return res;
-}
diff --git a/scripts/code_coverage_source/test_output/abort_after.txt b/scripts/code_coverage_source/test_output/abort_after.txt
deleted file mode 100644
index 78c19f6..0000000
--- a/scripts/code_coverage_source/test_output/abort_after.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-[doctest] run with "--help" for options
-== 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! )
-
-===============================================================================
-[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/count.txt b/scripts/code_coverage_source/test_output/count.txt
deleted file mode 100644
index 3859e0e..0000000
--- a/scripts/code_coverage_source/test_output/count.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-[doctest] run with "--help" for options
-===============================================================================
-[doctest] number of tests passing the current filters: 7
diff --git a/scripts/code_coverage_source/test_output/filter_1.txt b/scripts/code_coverage_source/test_output/filter_1.txt
deleted file mode 100644
index 4f77fd0..0000000
--- a/scripts/code_coverage_source/test_output/filter_1.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-[doctest] run with "--help" for options
-== 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
-
-test.cpp(0) FATAL ERROR!
- REQUIRE_THROWS_AS( throws(false), bool )
-didn't throw at all
-
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions - all of them
-
-test.cpp(0) FATAL ERROR!
- FAST_REQUIRE_UNARY_FALSE( 1 )
-with expansion:
- FAST_REQUIRE_UNARY_FALSE( 1 )
-
-===============================================================================
-[doctest] test cases: 2 | 0 passed | 2 failed | 5 skipped
-[doctest] assertions: 53 | 45 passed | 8 failed |
diff --git a/scripts/code_coverage_source/test_output/filter_2.txt b/scripts/code_coverage_source/test_output/filter_2.txt
deleted file mode 100644
index 5ceadb5..0000000
--- a/scripts/code_coverage_source/test_output/filter_2.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-[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)
-throws
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-===============================================================================
-[doctest] test cases: 5 | 3 passed | 2 failed | 2 skipped
-[doctest] assertions: 8 | 7 passed | 1 failed |
diff --git a/scripts/code_coverage_source/test_output/filter_3.txt b/scripts/code_coverage_source/test_output/filter_3.txt
deleted file mode 100644
index df328de..0000000
--- a/scripts/code_coverage_source/test_output/filter_3.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-[doctest] run with "--help" for options
-===============================================================================
-[doctest] test cases: 0 | 0 passed | 0 failed | 7 skipped
-[doctest] assertions: 0 | 0 passed | 0 failed |
diff --git a/scripts/code_coverage_source/test_output/filter_4.txt b/scripts/code_coverage_source/test_output/filter_4.txt
deleted file mode 100644
index 0f9ea7f..0000000
--- a/scripts/code_coverage_source/test_output/filter_4.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-[doctest] run with "--help" for options
-===============================================================================
-[doctest] test cases: 2 | 2 passed | 0 failed | 5 skipped
-[doctest] assertions: 5 | 5 passed | 0 failed |
diff --git a/scripts/code_coverage_source/test_output/filter_5.txt b/scripts/code_coverage_source/test_output/filter_5.txt
deleted file mode 100644
index 6634ddd..0000000
--- a/scripts/code_coverage_source/test_output/filter_5.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-[doctest] run with "--help" for options
-== 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
-
-test.cpp(0) FATAL ERROR!
- REQUIRE_THROWS_AS( throws(false), bool )
-didn't throw at all
-
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions - all of them
-
-test.cpp(0) FATAL ERROR!
- FAST_REQUIRE_UNARY_FALSE( 1 )
-with expansion:
- FAST_REQUIRE_UNARY_FALSE( 1 )
-
-== TEST CASE ==================================================================
-test.cpp(0)
-throws
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-===============================================================================
-[doctest] test cases: 4 | 1 passed | 3 failed | 3 skipped
-[doctest] assertions: 55 | 47 passed | 8 failed |
diff --git a/scripts/code_coverage_source/test_output/filter_6.txt b/scripts/code_coverage_source/test_output/filter_6.txt
deleted file mode 100644
index 9102e5c..0000000
--- a/scripts/code_coverage_source/test_output/filter_6.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-test.cpp(0)
-subcases
- 2
-
-test.cpp(0) ERROR!
- CHECK( 0 )
-with expansion:
- CHECK( 0 )
-
-===============================================================================
-[doctest] test cases: 3 | 2 passed | 1 failed | 4 skipped
-[doctest] assertions: 6 | 5 passed | 1 failed |
diff --git a/scripts/code_coverage_source/test_output/first_last.txt b/scripts/code_coverage_source/test_output/first_last.txt
deleted file mode 100644
index 45afa82..0000000
--- a/scripts/code_coverage_source/test_output/first_last.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions - all of them
-
-test.cpp(0) FATAL ERROR!
- FAST_REQUIRE_UNARY_FALSE( 1 )
-with expansion:
- FAST_REQUIRE_UNARY_FALSE( 1 )
-
-===============================================================================
-[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/help.txt b/scripts/code_coverage_source/test_output/help.txt
deleted file mode 100644
index 05600fa..0000000
--- a/scripts/code_coverage_source/test_output/help.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-[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/scripts/code_coverage_source/test_output/list_test_cases.txt b/scripts/code_coverage_source/test_output/list_test_cases.txt
deleted file mode 100644
index adbdac0..0000000
--- a/scripts/code_coverage_source/test_output/list_test_cases.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-[doctest] run with "--help" for options
-[doctest] listing all test case names
-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
deleted file mode 100644
index 91f3fb2..0000000
--- a/scripts/code_coverage_source/test_output/list_test_suites.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-[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/order_1.txt b/scripts/code_coverage_source/test_output/order_1.txt
deleted file mode 100644
index 8b200e4..0000000
--- a/scripts/code_coverage_source/test_output/order_1.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-[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
-
-test.cpp(0) FATAL ERROR!
- REQUIRE_THROWS_AS( throws(false), bool )
-didn't throw at all
-
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions - all of them
-
-test.cpp(0) FATAL ERROR!
- FAST_REQUIRE_UNARY_FALSE( 1 )
-with expansion:
- FAST_REQUIRE_UNARY_FALSE( 1 )
-
-== TEST CASE ==================================================================
-test.cpp(0)
-throws
-
-TEST CASE FAILED!
-threw exception:
- unknown exception
-
-===============================================================================
-[doctest] test cases: 7 | 3 passed | 4 failed | 0 skipped
-[doctest] assertions: 61 | 52 passed | 9 failed |
diff --git a/scripts/code_coverage_source/test_output/order_2.txt b/scripts/code_coverage_source/test_output/order_2.txt
deleted file mode 100644
index e40a34a..0000000
--- a/scripts/code_coverage_source/test_output/order_2.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-[doctest] run with "--help" for options
-== 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
-
-test.cpp(0) FATAL ERROR!
- REQUIRE_THROWS_AS( throws(false), bool )
-didn't throw at all
-
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions - all of them
-
-test.cpp(0) FATAL ERROR!
- FAST_REQUIRE_UNARY_FALSE( 1 )
-with expansion:
- FAST_REQUIRE_UNARY_FALSE( 1 )
-
-== 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!
-threw exception:
- unknown exception
-
-===============================================================================
-[doctest] test cases: 7 | 3 passed | 4 failed | 0 skipped
-[doctest] assertions: 61 | 52 passed | 9 failed |
diff --git a/scripts/code_coverage_source/test_output/order_3.txt b/scripts/code_coverage_source/test_output/order_3.txt
deleted file mode 100644
index df328de..0000000
--- a/scripts/code_coverage_source/test_output/order_3.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-[doctest] run with "--help" for options
-===============================================================================
-[doctest] test cases: 0 | 0 passed | 0 failed | 7 skipped
-[doctest] assertions: 0 | 0 passed | 0 failed |
diff --git a/scripts/code_coverage_source/test_output/successful.txt b/scripts/code_coverage_source/test_output/successful.txt
deleted file mode 100644
index 78a35aa..0000000
--- a/scripts/code_coverage_source/test_output/successful.txt
+++ /dev/null
@@ -1,392 +0,0 @@
-[doctest] run with "--help" for options
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions
-
-test.cpp(0) PASSED!
- CHECK( true )
-with expansion:
- CHECK( true )
-
-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) PASSED!
- CHECK_THROWS( throws(true) )
-
-test.cpp(0) ERROR!
- CHECK_THROWS( throws(false) )
-didn't throw at all
-
-test.cpp(0) PASSED!
- CHECK_NOTHROW( throws(false) )
-
-test.cpp(0) ERROR!
- CHECK_NOTHROW( throws(true) )
-threw exception:
- unknown exception
-
-test.cpp(0) PASSED!
- CHECK_THROWS_AS( throws(true), bool )
-
-test.cpp(0) FATAL ERROR!
- REQUIRE_THROWS_AS( throws(false), bool )
-didn't throw at all
-
-== TEST CASE ==================================================================
-test.cpp(0)
-assertions - all of them
-
-test.cpp(0) PASSED!
- WARN( true )
-with expansion:
- WARN( true )
-
-test.cpp(0) PASSED!
- CHECK( true )
-with expansion:
- CHECK( true )
-
-test.cpp(0) PASSED!
- REQUIRE( true )
-with expansion:
- REQUIRE( true )
-
-test.cpp(0) PASSED!
- WARN_FALSE( false )
-with expansion:
- WARN_FALSE( false )
-
-test.cpp(0) PASSED!
- CHECK_FALSE( false )
-with expansion:
- CHECK_FALSE( false )
-
-test.cpp(0) PASSED!
- REQUIRE_FALSE( false )
-with expansion:
- REQUIRE_FALSE( false )
-
-test.cpp(0) PASSED!
- WARN_THROWS( throws(true) )
-
-test.cpp(0) PASSED!
- CHECK_THROWS( throws(true) )
-
-test.cpp(0) PASSED!
- REQUIRE_THROWS( throws(true) )
-
-test.cpp(0) PASSED!
- WARN_THROWS_AS( throws(true), bool )
-
-test.cpp(0) PASSED!
- CHECK_THROWS_AS( throws(true), bool )
-
-test.cpp(0) PASSED!
- REQUIRE_THROWS_AS( throws(true), bool )
-
-test.cpp(0) PASSED!
- WARN_NOTHROW( throws(false) )
-
-test.cpp(0) PASSED!
- CHECK_NOTHROW( throws(false) )
-
-test.cpp(0) PASSED!
- REQUIRE_NOTHROW( throws(false) )
-
-test.cpp(0) PASSED!
- WARN_EQ( 1, 1 )
-with expansion:
- WARN_EQ( 1, 1 )
-
-test.cpp(0) PASSED!
- CHECK_EQ( 1, 1 )
-with expansion:
- CHECK_EQ( 1, 1 )
-
-test.cpp(0) PASSED!
- REQUIRE_EQ( 1, 1 )
-with expansion:
- REQUIRE_EQ( 1, 1 )
-
-test.cpp(0) PASSED!
- WARN_NE( 1, 0 )
-with expansion:
- WARN_NE( 1, 0 )
-
-test.cpp(0) PASSED!
- CHECK_NE( 1, 0 )
-with expansion:
- CHECK_NE( 1, 0 )
-
-test.cpp(0) PASSED!
- REQUIRE_NE( 1, 0 )
-with expansion:
- REQUIRE_NE( 1, 0 )
-
-test.cpp(0) PASSED!
- WARN_GT( 1, 0 )
-with expansion:
- WARN_GT( 1, 0 )
-
-test.cpp(0) PASSED!
- CHECK_GT( 1, 0 )
-with expansion:
- CHECK_GT( 1, 0 )
-
-test.cpp(0) PASSED!
- REQUIRE_GT( 1, 0 )
-with expansion:
- REQUIRE_GT( 1, 0 )
-
-test.cpp(0) PASSED!
- WARN_LT( 0, 1 )
-with expansion:
- WARN_LT( 0, 1 )
-
-test.cpp(0) PASSED!
- CHECK_LT( 0, 1 )
-with expansion:
- CHECK_LT( 0, 1 )
-
-test.cpp(0) PASSED!
- REQUIRE_LT( 0, 1 )
-with expansion:
- REQUIRE_LT( 0, 1 )
-
-test.cpp(0) PASSED!
- WARN_GE( 1, 1 )
-with expansion:
- WARN_GE( 1, 1 )
-
-test.cpp(0) PASSED!
- CHECK_GE( 1, 1 )
-with expansion:
- CHECK_GE( 1, 1 )
-
-test.cpp(0) PASSED!
- REQUIRE_GE( 1, 1 )
-with expansion:
- REQUIRE_GE( 1, 1 )
-
-test.cpp(0) PASSED!
- WARN_LE( 1, 1 )
-with expansion:
- WARN_LE( 1, 1 )
-
-test.cpp(0) PASSED!
- CHECK_LE( 1, 1 )
-with expansion:
- CHECK_LE( 1, 1 )
-
-test.cpp(0) PASSED!
- REQUIRE_LE( 1, 1 )
-with expansion:
- REQUIRE_LE( 1, 1 )
-
-test.cpp(0) PASSED!
- WARN_UNARY( 1 )
-with expansion:
- WARN_UNARY( 1 )
-
-test.cpp(0) PASSED!
- CHECK_UNARY( 1 )
-with expansion:
- CHECK_UNARY( 1 )
-
-test.cpp(0) PASSED!
- REQUIRE_UNARY( 1 )
-with expansion:
- REQUIRE_UNARY( 1 )
-
-test.cpp(0) PASSED!
- WARN_UNARY_FALSE( 0 )
-with expansion:
- WARN_UNARY_FALSE( 0 )
-
-test.cpp(0) PASSED!
- CHECK_UNARY_FALSE( 0 )
-with expansion:
- CHECK_UNARY_FALSE( 0 )
-
-test.cpp(0) PASSED!
- REQUIRE_UNARY_FALSE( 0 )
-with expansion:
- REQUIRE_UNARY_FALSE( 0 )
-
-test.cpp(0) PASSED!
- FAST_WARN_EQ( 1, 1 )
-with expansion:
- FAST_WARN_EQ( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_EQ( 1, 1 )
-with expansion:
- FAST_CHECK_EQ( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_EQ( 1, 1 )
-with expansion:
- FAST_REQUIRE_EQ( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_WARN_NE( 1, 0 )
-with expansion:
- FAST_WARN_NE( 1, 0 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_NE( 1, 0 )
-with expansion:
- FAST_CHECK_NE( 1, 0 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_NE( 1, 0 )
-with expansion:
- FAST_REQUIRE_NE( 1, 0 )
-
-test.cpp(0) PASSED!
- FAST_WARN_GT( 1, 0 )
-with expansion:
- FAST_WARN_GT( 1, 0 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_GT( 1, 0 )
-with expansion:
- FAST_CHECK_GT( 1, 0 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_GT( 1, 0 )
-with expansion:
- FAST_REQUIRE_GT( 1, 0 )
-
-test.cpp(0) PASSED!
- FAST_WARN_LT( 0, 1 )
-with expansion:
- FAST_WARN_LT( 0, 1 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_LT( 0, 1 )
-with expansion:
- FAST_CHECK_LT( 0, 1 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_LT( 0, 1 )
-with expansion:
- FAST_REQUIRE_LT( 0, 1 )
-
-test.cpp(0) PASSED!
- FAST_WARN_GE( 1, 1 )
-with expansion:
- FAST_WARN_GE( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_GE( 1, 1 )
-with expansion:
- FAST_CHECK_GE( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_GE( 1, 1 )
-with expansion:
- FAST_REQUIRE_GE( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_WARN_LE( 1, 1 )
-with expansion:
- FAST_WARN_LE( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_LE( 1, 1 )
-with expansion:
- FAST_CHECK_LE( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_LE( 1, 1 )
-with expansion:
- FAST_REQUIRE_LE( 1, 1 )
-
-test.cpp(0) PASSED!
- FAST_WARN_UNARY( 1 )
-with expansion:
- FAST_WARN_UNARY( 1 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_UNARY( 1 )
-with expansion:
- FAST_CHECK_UNARY( 1 )
-
-test.cpp(0) PASSED!
- FAST_REQUIRE_UNARY( 1 )
-with expansion:
- FAST_REQUIRE_UNARY( 1 )
-
-test.cpp(0) PASSED!
- FAST_WARN_UNARY_FALSE( 0 )
-with expansion:
- FAST_WARN_UNARY_FALSE( 0 )
-
-test.cpp(0) PASSED!
- FAST_CHECK_UNARY_FALSE( 0 )
-with expansion:
- FAST_CHECK_UNARY_FALSE( 0 )
-
-test.cpp(0) FATAL ERROR!
- FAST_REQUIRE_UNARY_FALSE( 1 )
-with expansion:
- FAST_REQUIRE_UNARY_FALSE( 1 )
-
-== 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!
-threw exception:
- unknown exception
-
-===============================================================================
-[doctest] test cases: 5 | 1 passed | 4 failed | 2 skipped
-[doctest] assertions: 56 | 47 passed | 9 failed |
diff --git a/scripts/code_coverage_source/test_output/version.txt b/scripts/code_coverage_source/test_output/version.txt
deleted file mode 100644
index e69de29..0000000
--- a/scripts/code_coverage_source/test_output/version.txt
+++ /dev/null