1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-01 06:30:52 +02:00

back to version 1.0

respect most review comments
This commit is contained in:
ClausKlein 2021-02-11 19:17:06 +01:00
parent 4f309d5b79
commit f158b9ca9c
3 changed files with 28 additions and 24 deletions

View file

@ -16,8 +16,13 @@ TEST_CASE("Greeter") {
}
TEST_CASE("Greeter version") {
static_assert(std::string_view(GREETER_VERSION) == std::string_view("1.1"));
CHECK(std::string(GREETER_VERSION) == std::string("1.1"));
#if (__cpp_lib_starts_ends_with)
static_assert(std::string_view(GREETER_VERSION).starts_with("1.0")); // TBD C++20 only
CHECK(std::string(GREETER_VERSION).starts_with("1.0")); // SameMajorVersion
#else
static_assert(std::string_view(GREETER_VERSION) == std::string_view("1.0"));
CHECK(std::string(GREETER_VERSION) == std::string("1.0"));
#endif
}
TEST_CASE("Greeter date") {