Skip to content
Snippets Groups Projects
Commit 73d0b5d8 authored by Tobias Pflug's avatar Tobias Pflug
Browse files

Drop unnecessary std::string

parent 1f3602a2
No related branches found
No related tags found
No related merge requests found
......@@ -111,29 +111,29 @@ namespace nix {
TEST(baseNameOf, emptyPath) {
auto p1 = baseNameOf("");
ASSERT_EQ(std::string(p1), "");
ASSERT_EQ(p1, "");
}
TEST(baseNameOf, pathOnRoot) {
auto p1 = baseNameOf("/dir");
ASSERT_EQ(std::string(p1), "dir");
ASSERT_EQ(p1, "dir");
}
TEST(baseNameOf, relativePath) {
auto p1 = baseNameOf("dir/foo");
ASSERT_EQ(std::string(p1), "foo");
ASSERT_EQ(p1, "foo");
}
TEST(baseNameOf, pathWithTrailingSlashRoot) {
auto p1 = baseNameOf("/");
ASSERT_EQ(std::string(p1), "");
ASSERT_EQ(p1, "");
}
// XXX: according to the doc of `baseNameOf`, baseNameOf("/dir/") should return
// "" but it actually returns "dir"
TEST(baseNameOf, DISABLED_trailingSlash) {
auto p1 = baseNameOf("/dir/");
ASSERT_EQ(std::string(p1), "");
ASSERT_EQ(p1, "");
}
/* ----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment