plugin.cpp (734B)
1 #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL 2 #include <doctest/doctest.h> 3 4 DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN 5 #include <cstdio> 6 DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END 7 8 // most of these are used here just to test that they compile successfully from within a plugin 9 TEST_SUITE("some test suite") { 10 TEST_CASE("test case in a plugin") { 11 SUBCASE("some subcase") { 12 INFO("some info"); 13 MESSAGE("triggering the INFO above to be printed"); 14 CHECK(1 == 2); 15 FAIL("certain death!"); 16 } 17 } 18 } 19 20 // set an exception translator for char 21 REGISTER_EXCEPTION_TRANSLATOR(char& e) { 22 return doctest::String("char: ") + doctest::toString(e); 23 }