1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-03 23:50:53 +02:00

Merge branch 'master' into develop

This commit is contained in:
Claus Klein 2021-02-27 12:10:53 +01:00 committed by GitHub
commit 9d1c7413f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 38 deletions

View file

@ -14,11 +14,6 @@ TEST_CASE("Greeter") {
}
TEST_CASE("Greeter version") {
#if (__cpp_lib_starts_ends_with)
static_assert(std::string_view(GREETER_VERSION).starts_with("1")); // TBD C++20 only
CHECK(std::string(GREETER_VERSION).starts_with("1")); // SameMajorVersion
#else
static_assert(std::string_view(GREETER_VERSION) == std::string_view("1.0.1"));
CHECK(std::string(GREETER_VERSION) == std::string("1.0.1"));
#endif
static_assert(std::string_view(GREETER_VERSION) == std::string_view("1.0"));
CHECK(std::string(GREETER_VERSION) == std::string("1.0"));
}