squashing git history for the last time
diff --git a/examples/dev_testing/CMakeLists.txt b/examples/dev_testing/CMakeLists.txt
new file mode 100644
index 0000000..964ac58
--- /dev/null
+++ b/examples/dev_testing/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 2.8)

+

+project(dev_testing)

+

+include(../../scripts/flags.cmake)

+

+add_definitions(-DDOCTEST_CONFIG_SHORT_MACRO_NAMES)

+

+include_directories("../../doctest/")

+

+add_executable(${PROJECT_NAME} main.cpp)

+

+add_test(NAME ${PROJECT_NAME} COMMAND $<TARGET_FILE:${PROJECT_NAME}> -dt-count=1)

diff --git a/examples/dev_testing/exceptions.cpp b/examples/dev_testing/exceptions.cpp
new file mode 100644
index 0000000..28c7cc7
--- /dev/null
+++ b/examples/dev_testing/exceptions.cpp
@@ -0,0 +1,44 @@
+// open a cmd and execute this: "C:\Program Files (x86)\Microsoft Visual Studio 11.0\vc\vcvarsall.bat" amd64

+// compile with:

+//  cl.exe a.cpp /EHs

+//  cl.exe a.cpp /EHa

+ 

+#ifdef _MSC_VER

+//#include <windows.h>

+#endif

+ 

+#include <iostream>

+using namespace std;

+ 

+void f(int argc, char** argv) {

+    try {

+        *((char*)666) = 1;

+    } catch(...) {

+        cout << "bad boy!" << endl;

+    }

+   

+    try {

+        int out = 5 / (argc - 1);

+        cout << out;

+    } catch(...) {

+        cout << "bad boy!" << endl;

+    }

+}

+ 

+int main(int argc, char** argv) {

+ 

+#ifdef _MSC_VER

+    __try {

+#endif

+ 

+    f(argc, argv);

+ 

+#ifdef _MSC_VER

+    //} __except(EXCEPTION_EXECUTE_HANDLER) {

+    } __except(1) {

+        cout << "bad MS boy!" << endl;

+    }

+#endif

+ 

+    return 0;

+}
\ No newline at end of file
diff --git a/examples/dev_testing/main.cpp b/examples/dev_testing/main.cpp
new file mode 100644
index 0000000..9b86b8a
--- /dev/null
+++ b/examples/dev_testing/main.cpp
@@ -0,0 +1,153 @@
+//#define DOCTEST_CONFIG_DISABLE

+

+#define DOCTEST_CONFIG_IMPLEMENT

+#include "doctest.h"

+

+#include <cstdio>

+#include <exception>

+

+#define DECOMPOSE(expr) (expression_decomposer() << expr)

+

+#define EXPECT(expr)                                                                               \

+    do {                                                                                           \

+        if(result failed = DECOMPOSE(expr))                                                        \

+            printf("failed!\n");                                                                   \

+    } while(false)

+

+struct result

+{

+    const bool passed;

+    const doctest::String decomposition;

+

+    result(bool passed, const doctest::String& decomposition)

+        : passed(passed), decomposition(decomposition) {}

+    operator bool() { return !passed; }

+};

+

+//inline std::string to_string(std::string    const & text) { return "\"" + text + "\""; }

+inline doctest::String to_string(const char * text) { return doctest::String("\"") + text + "\""; }

+//inline doctest::String to_string(char text) { return doctest::String("\'") + text + "\'"; }

+

+inline std::ostream & operator<<(std::ostream & os, approx const & appr)

+{

+    return os << appr.magnitude();

+}

+

+template <typename T>

+std::string to_string(T const & value, int = 0 /* VC6 */)

+{

+    std::ostringstream os; os << std::boolalpha << value; return os.str();

+}

+

+template<typename T1, typename T2>

+std::string to_string(std::pair<T1, T2> const & pair)

+{

+    std::ostringstream oss;

+    oss << "{ " << to_string(pair.first) << ", " << to_string(pair.second) << " }";

+    return oss.str();

+}

+

+template <typename L, typename R>

+std::string to_string(L const & lhs, std::string op, R const & rhs)

+{

+    std::ostringstream os; os << to_string(lhs) << " " << op << " " << to_string(rhs); return os.str();

+}

+

+

+template <typename L>

+struct expression_lhs

+{

+    const L lhs;

+

+    expression_lhs(L lhs)

+            : lhs(lhs) {}

+

+    operator result() { return result(!!lhs, to_string(lhs)); }

+

+    // clang-format off

+    template <typename R> result operator==(R const & rhs) { return result(lhs == rhs, to_string(lhs, "==", rhs)); }

+    template <typename R> result operator!=(R const & rhs) { return result(lhs != rhs, to_string(lhs, "!=", rhs)); }

+    template <typename R> result operator< (R const & rhs) { return result(lhs <  rhs, to_string(lhs, "<", rhs)); }

+    template <typename R> result operator<=(R const & rhs) { return result(lhs <= rhs, to_string(lhs, "<=", rhs)); }

+    template <typename R> result operator> (R const & rhs) { return result(lhs >  rhs, to_string(lhs, ">", rhs)); }

+    template <typename R> result operator>=(R const & rhs) { return result(lhs >= rhs, to_string(lhs, ">=", rhs)); }

+    // clang-format on

+};

+

+struct expression_decomposer

+{

+    template <typename L>

+    expression_lhs<L const&> operator<<(L const& operand) {

+        return expression_lhs<L const &>(operand);

+    }

+};

+

+

+testsuite(MAIN);

+test(zzz) {

+    printf("main\n");

+    subtest("") {

+        printf("1\n");

+        subtest("") { printf("1-1\n"); }

+        subtest("") { printf("1-2\n"); }

+    }

+    subtest("") { printf("2\n"); }

+}

+testsuite_end;

+

+struct Empty

+{

+    virtual ~Empty() {}

+};

+

+doctest_fixture(Empty, trololo) { printf("Help?\n"); }

+

+// test(thrower)

+//{

+//    if(rand() > 4) {

+//        throw std::exception();

+//    } else {

+//        cout << "trololo" << endl;

+//    }

+//}

+

+static int testWrapper(void (*f)(void)) {

+    try {

+        f();

+    } catch(std::exception& e) {

+        printf("caught the bugger! %s\n", e.what());

+        return 1;

+    }

+    return 0;

+}

+

+int main(int argc, char** argv) {

+    // initialize

+    doctest::Context context(argc, argv);

+    context.setTestExecutionWrapper(testWrapper);

+

+    // overrides

+    context.setOption("dt-case-sensitive", true);

+    context.addFilter("dt-name", "zzz");

+

+    // run

+    int res = context.runTests();

+

+#if defined(WITH_PAUSE)

+    system("pause");

+#endif // _MSC_VER

+

+    return res;

+}

+

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

+// test("") { printf("TEST %d\n", __LINE__); }

diff --git a/examples/dev_testing/test.cpp b/examples/dev_testing/test.cpp
new file mode 100644
index 0000000..2ed1cb9
--- /dev/null
+++ b/examples/dev_testing/test.cpp
@@ -0,0 +1,32 @@
+#include "doctest.h"

+

+#include <cstdio>

+

+testsuite(test);

+

+test(ttt)

+{

+    printf("test!\n");

+}

+

+struct F {

+    F()

+    {

+        printf("ctor!\n");

+    }

+    ~F()

+    {

+        printf("dtor...\n");

+    }

+};

+

+fixture_noname(F)

+{

+    printf("    fixturing!\n");

+}

+

+testsuite_end;

+

+

+test(__LINE__) {}

+test(__LINE__) {}
\ No newline at end of file
diff --git a/examples/dev_testing/test_output/dev_testing.txt b/examples/dev_testing/test_output/dev_testing.txt
new file mode 100644
index 0000000..a9e9ac6
--- /dev/null
+++ b/examples/dev_testing/test_output/dev_testing.txt
@@ -0,0 +1 @@
+[doctest] number of registered tests passing the current filters: 1