Silence some warnings
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2025. MadVoxel AG
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -550,6 +555,17 @@ TEST_CASE("testToString", "[Version]")
|
||||
REQUIRE_FALSE(VERSION_1_0 == static_cast<const std::string&>(version_1));
|
||||
REQUIRE_FALSE(VERSION_1_0 == static_cast<const std::string&>(version_1_2));
|
||||
REQUIRE_FALSE("2.0" == static_cast<const std::string&>(version_v2_0));
|
||||
REQUIRE("v2.0" == version_v2_0.String());
|
||||
}
|
||||
|
||||
TEST_CASE("testTags", "[Version]")
|
||||
{
|
||||
const Version taged("v1.2.3-ALPHA-B99");
|
||||
REQUIRE(taged.Build() == 99);
|
||||
REQUIRE(taged.GetTags().size() == 2);
|
||||
REQUIRE(taged.GetTags()[0] == "ALPHA");
|
||||
REQUIRE(taged.GetTags()[1] == "B99");
|
||||
REQUIRE(Version("1.90").GetTags().empty());
|
||||
}
|
||||
|
||||
TEST_CASE("testUnimportantVersionParts", "[Version]")
|
||||
@@ -603,3 +619,12 @@ TEST_CASE("testMoveConstructorAndAssignment", "[Version]")
|
||||
REQUIRE(extended3 != extended);
|
||||
REQUIRE(extended3 != mvConstructedExtended);
|
||||
}
|
||||
|
||||
TEST_CASE("testLiterals", "[Version]")
|
||||
{
|
||||
REQUIRE(version_1 == 1_v);
|
||||
REQUIRE(version_1 == 1.0_v);
|
||||
REQUIRE(version_1_2 == 1.2_v);
|
||||
REQUIRE(version_1_2 == 1.2_version);
|
||||
REQUIRE(Version(1, 2, 3) == "1.2.3"_version);
|
||||
}
|
||||
Reference in New Issue
Block a user