31 Dwarf::Path path(rawBaseDir, rawSubDir, rawFile);
33 CHECK_EQ(expectedBaseDir, path.baseDir())
34 <<
"Path(" << rawBaseDir <<
", " << rawSubDir <<
", " << rawFile <<
")";
35 CHECK_EQ(expectedSubDir, path.subDir())
36 <<
"Path(" << rawBaseDir <<
", " << rawSubDir <<
", " << rawFile <<
")";
37 CHECK_EQ(expectedFile, path.file())
38 <<
"Path(" << rawBaseDir <<
", " << rawSubDir <<
", " << rawFile <<
")";
40 CHECK_EQ(expectedPath, path.toString());
45 len = path.toBuffer(buf, 1024);
50 checkPath(
"hello.cpp",
"",
"",
"hello.cpp",
"",
"",
"hello.cpp");
51 checkPath(
"foo/hello.cpp",
"foo",
"",
"hello.cpp",
"foo",
"",
"hello.cpp");
52 checkPath(
"foo/hello.cpp",
"foo",
"",
"hello.cpp",
"",
"foo",
"hello.cpp");
53 checkPath(
"hello.cpp",
"",
"",
"hello.cpp",
"./////",
"./////",
"hello.cpp");
54 checkPath(
"/hello.cpp",
"/",
"",
"hello.cpp",
"/////",
"./////",
"hello.cpp");
56 "/hello.cpp",
"/",
"",
"hello.cpp",
"/./././././././",
"",
"hello.cpp");
void checkPath(std::string expectedPath, std::string expectedBaseDir, std::string expectedSubDir, std::string expectedFile, std::string rawBaseDir, std::string rawSubDir, std::string rawFile)