1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00

DOCTEST_CONFIG_USE_STD_HEADERS in MSVC++ (#30)

* replace <sstream> with <ostream>

* Use provided by doctest macro instead of explicit include (#1)

* dEfine  `DOCTEST_CONFIG_USE_STD_HEADERS` globally
This commit is contained in:
Cvelth 2020-04-24 13:20:42 +03:00 committed by GitHub
parent 956c2f09b6
commit cefd3fb80e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View file

@ -48,6 +48,7 @@ if (NOT TEST_INSTALLED_VERSION)
target_compile_options(Greeter PUBLIC -Wall -pedantic -Wextra -Werror) target_compile_options(Greeter PUBLIC -Wall -pedantic -Wextra -Werror)
elseif(MSVC) elseif(MSVC)
target_compile_options(Greeter PUBLIC /W4 /WX) target_compile_options(Greeter PUBLIC /W4 /WX)
target_compile_definitions(GreeterTests PUBLIC DOCTEST_CONFIG_USE_STD_HEADERS)
endif() endif()
endif() endif()

View file

@ -1,11 +1,6 @@
#include <doctest/doctest.h> #include <doctest/doctest.h>
#include <greeter.h> #include <greeter.h>
#if defined(_WIN32) || defined(WIN32)
// apparently this is required to compile in MSVC++
# include <sstream>
#endif
TEST_CASE("Greeter") { TEST_CASE("Greeter") {
using namespace greeter; using namespace greeter;