Create function getProcessPath and add unit test for it
Debugging: Relative and Absolute path alternatives
This commit is contained in:
@@ -153,3 +153,17 @@ TEST(AUri, parsesAndDecoreUrl)
|
||||
|
||||
Uri::Decode(uri);
|
||||
}
|
||||
|
||||
TEST(getProcessPath, obtainPathOfUnitTestsExecutable)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
const std::string expectedName("bin");
|
||||
#else
|
||||
const std::string expectedName("bin");
|
||||
#endif
|
||||
const std::string path = getProcessPath();
|
||||
|
||||
ASSERT_FALSE(path.empty());
|
||||
const size_t idxStart = path.size() - expectedName.size();
|
||||
ASSERT_EQ(expectedName, path.substr(idxStart, expectedName.size()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user