mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 21:51:12 +02:00
* replace <sstream> with <ostream> * Use provided by doctest macro instead of explicit include (#1) * dEfine `DOCTEST_CONFIG_USE_STD_HEADERS` globally
13 lines
377 B
C++
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!");
|
|
}
|