diff --git a/include/duckhandy/version_bt.hpp b/include/duckhandy/version_bt.hpp index 5b7f80d..ebabbc0 100644 --- a/include/duckhandy/version_bt.hpp +++ b/include/duckhandy/version_bt.hpp @@ -27,7 +27,7 @@ namespace dhandy { template class Version { public: - constexpr static std::size_t Count = N; + constexpr static const std::size_t count = N; constexpr Version (const char* const ver, bool accept_less=false); diff --git a/test/unit/version_test.cpp b/test/unit/version_test.cpp index 60b8cb0..3f69ace 100644 --- a/test/unit/version_test.cpp +++ b/test/unit/version_test.cpp @@ -24,7 +24,7 @@ TEST_CASE ("Version class tests", "[version][bt]") { { constexpr Version<1> ver{"102"}; static_assert(ver.major() == 102, "Version error"); - static_assert(ver.Count == 1, "Version error"); + static_assert(ver.count == 1, "Version error"); CHECK(ver[0] == 102); CHECK_THROWS(ver[1]); CHECK_THROWS(ver[2]); @@ -34,7 +34,7 @@ TEST_CASE ("Version class tests", "[version][bt]") { { constexpr Version<3> ver{".aheud15,a.ud22,cu.sh81,.nuad.h44"}; - static_assert(ver.Count == 3, "Version error"); + static_assert(ver.count == 3, "Version error"); static_assert(ver.major() == 15, "Version error"); static_assert(ver.minor() == 22, "Version error"); static_assert(ver.revision() == 81, "Version error"); @@ -47,7 +47,7 @@ TEST_CASE ("Version class tests", "[version][bt]") { { constexpr Version<10> ver{"1.2.3.44.55.66.777.888.999.101010"}; - static_assert(ver.Count == 10, "Version error"); + static_assert(ver.count == 10, "Version error"); static_assert(ver.major() == 1, "Version error"); static_assert(ver.minor() == 2, "Version error"); static_assert(ver.revision() == 3, "Version error"); @@ -66,7 +66,7 @@ TEST_CASE ("Version class tests", "[version][bt]") { { constexpr Version<4> ver{"1.2.3.", true}; - static_assert(ver.Count == 4, "Version error"); + static_assert(ver.count == 4, "Version error"); static_assert(ver.major() == 1, "Version error"); static_assert(ver.minor() == 2, "Version error"); static_assert(ver.revision() == 3, "Version error"); @@ -79,7 +79,7 @@ TEST_CASE ("Version class tests", "[version][bt]") { { constexpr Version<4> ver{"6.7.2-r1"}; - static_assert(ver.Count == 4, "Version error"); + static_assert(ver.count == 4, "Version error"); static_assert(ver.major() == 6, "Version error"); static_assert(ver.minor() == 7, "Version error"); static_assert(ver.revision() == 2, "Version error");