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

Create version header and update readme (#44)

* add note on github pages

* add version information to standalone. closes #35.

* update version info

* move includes into project directory and create version header

* fix style

* add comment for version header location
This commit is contained in:
Lars Melchior 2020-06-03 16:25:44 +02:00 committed by GitHub
parent 032e506c12
commit 92adf2db25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 7 deletions

View file

@ -1,5 +1,8 @@
#include <doctest/doctest.h>
#include <greeter.h>
#include <greeter/greeter.h>
#include <greeter/version.h>
#include <string>
TEST_CASE("Greeter") {
using namespace greeter;
@ -11,3 +14,8 @@ TEST_CASE("Greeter") {
CHECK(greeter.greet(LanguageCode::ES) == "¡Hola Tests!");
CHECK(greeter.greet(LanguageCode::FR) == "Bonjour Tests!");
}
TEST_CASE("Greeter version") {
static_assert(std::string_view(GREETER_VERSION) == std::string_view("1.0"));
CHECK(std::string(GREETER_VERSION) == std::string("1.0"));
}