mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Rename LootVersion::string() to LootVersion::GetVersionString()
For consistency with the naming of other API methods.
This commit is contained in:
@@ -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();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user