added playground project and made (again) the common.cmake behave when included multiple times
diff --git a/scripts/playground/CMakeLists.txt b/scripts/playground/CMakeLists.txt
new file mode 100644
index 0000000..c587a8e
--- /dev/null
+++ b/scripts/playground/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(playground)
+
+include(../cmake/common.cmake)
+
+include_directories("../../doctest/")
+
+doctest_add_executable(${PROJECT_NAME} main.cpp test.cpp)
+
+doctest_add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}>)
diff --git a/scripts/playground/main.cpp b/scripts/playground/main.cpp
new file mode 100644
index 0000000..5da4c16
--- /dev/null
+++ b/scripts/playground/main.cpp
@@ -0,0 +1,30 @@
+#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/scripts/playground/test.cpp b/scripts/playground/test.cpp
new file mode 100644
index 0000000..c19579c
--- /dev/null
+++ b/scripts/playground/test.cpp
@@ -0,0 +1,12 @@
+#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/scripts/playground/test_output/playground.txt b/scripts/playground/test_output/playground.txt
new file mode 100644
index 0000000..0266018
--- /dev/null
+++ b/scripts/playground/test_output/playground.txt
@@ -0,0 +1,13 @@
+[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 |