deleted second assert, added test case

Signed-off-by: IsiGebauer <isigebauer0@gmail.com>
Signed-off-by: IsiGebauer <emanuel.gebauer0@gmail.com>
This commit is contained in:
IsiGebauer 2024-12-28 21:01:55 +01:00 committed by IsiGebauer
parent 9fbe9540db
commit 2089627bdc
No known key found for this signature in database
GPG key ID: 65BE6ED421A3F911
2 changed files with 2 additions and 1 deletions

View file

@ -81,6 +81,8 @@ UNIT_TEST(FilePath_Join)
TEST_EQUAL("omim/strings.txt", base::JoinPath("omim/", "strings.txt"), ());
TEST_EQUAL("../../omim/strings.txt", base::JoinPath("..", "..", "omim", "strings.txt"), ());
TEST_EQUAL("../../omim/strings.txt", base::JoinPath("../", "..", "omim/", "strings.txt"), ());
TEST_EQUAL("omim/strings.txt", base::JoinPath("", "omim/", "strings.txt"), ());
TEST_EQUAL("omim/strings.txt", base::JoinPath("", "","omim/", "strings.txt"), ());
}
#endif // OMIM_OS_WINDOWS

View file

@ -55,7 +55,6 @@ std::string JoinPath(std::string const & folder, Args &&... args)
template <typename... Args>
std::string JoinPath(std::string const & dir, std::string const & fileOrDir, Args &&... args)
{
ASSERT(!fileOrDir.empty(), ("JoinPath fileOrDir is empty"));
return impl::JoinPath(dir, fileOrDir, std::forward<Args>(args)...);
}
} // namespace base