MyModernCppStarter/test/source/greeter.cpp
Cvelth cefd3fb80e
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
2020-04-24 12:20:42 +02:00

13 lines
377 B
C++

#include <doctest/doctest.h>
#include <greeter.h>
TEST_CASE("Greeter") {
using namespace greeter;
Greeter greeter("World");
CHECK(greeter.greet(LanguageCode::EN) == "Hello, World!");
CHECK(greeter.greet(LanguageCode::DE) == "Hallo World!");
CHECK(greeter.greet(LanguageCode::ES) == "¡Hola World!");
CHECK(greeter.greet(LanguageCode::FR) == "Bonjour World!");
}