Rename LootVersion::string() to LootVersion::GetVersionString()

For consistency with the naming of other API methods.
This commit is contained in:
Oliver Hamlet
2018-10-20 12:48:23 +01:00
parent fa7e454403
commit 5250cb3696
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ public:
* @brief Get the API version as a string.
* @return A string of the form "major.minor.patch".
*/
LOOT_API static std::string string();
LOOT_API static std::string GetVersionString();
};
}
+1 -1
View File
@@ -30,7 +30,7 @@ const unsigned int LootVersion::minor = 13;
const unsigned int LootVersion::patch = 8;
const std::string LootVersion::revision = "@GIT_COMMIT_STRING@";
LOOT_API std::string LootVersion::string() {
LOOT_API std::string LootVersion::GetVersionString() {
return std::to_string(major) + '.' + std::to_string(minor) + '.' + std::to_string(patch);
}
}
@@ -55,14 +55,14 @@ INSTANTIATE_TEST_CASE_P(, VersionTest, ::testing::Values(GameType::tes5));
TEST_P(VersionTest, shouldExtractVersionFromNonAsciiDll) {
Version version(dataPath / std::filesystem::u8path(nonAsciiDll));
std::string expected(LootVersion::string() + ".0");
std::string expected(LootVersion::GetVersionString() + ".0");
EXPECT_EQ(expected, version.AsString());
}
TEST(Version, shouldExtractVersionFromApiDll) {
// Use the API DLL built.
Version version(std::filesystem::path("loot_api.dll"));
std::string expected(LootVersion::string() + ".0");
std::string expected(LootVersion::GetVersionString() + ".0");
EXPECT_EQ(expected, version.AsString());
}
#endif