10using namespace boost::unit_test_framework;
30 std::string _currentWorkingDir;
36 : test_suite(
"ParserUtilitiesTestSuite") {
37 boost::shared_ptr<ParserUtilsTestClass> parserUtilTest(
new ParserUtilsTestClass(currentWorkingDirectory));
47 if(framework::master_test_suite().argc < 2) {
48 std::cout <<
"Usage: " << framework::master_test_suite().argv[0] <<
" currentWorkingDir" << std::endl;
51 auto* currentWorkingDir = framework::master_test_suite().argv[1];
53 framework::master_test_suite().p_name.value =
"Rebot backend test suite";
60: _currentWorkingDir(
std::move(currentWorkingDirectory)) {}
66 std::string expectedReturnValue = _currentWorkingDir +
"/";
ParserUtilitiesTestSuite(std::string const ¤tWorkingDirectory)
void testConvertToAbsPath()
void testExtractDirectory()
void testConcatenatePaths()
ParserUtilsTestClass(std::string currentWorkingDirectory)
void testExtractFileName()
void testGetCurrentWorkingDir()
std::string extractFileName(std::string const &path)
Extract the string after the last '/' in a path. Returned substring does not include the '/' characte...
std::string getCurrentWorkingDirectory()
Returns absolute path to current working directory. The returned path ends with a forward slash.
std::string extractDirectory(std::string const &path)
Returns the path to the directory containing the file provided as the input parameter.
std::string concatenatePaths(const std::string &path1, const std::string &path2)
Concatenates two given paths using custom rules.
std::string convertToAbsolutePath(std::string const &relativePath)
Converts a relative path to its absolute path.