diff options
author | Tobias Pflug <tobias.pflug@gmail.com> | 2020-05-07 19:29:10 +0200 |
---|---|---|
committer | Tobias Pflug <tobias.pflug@gmail.com> | 2020-05-07 19:29:10 +0200 |
commit | 73d0b5d807edee05910cff4a30549393d5375d89 (patch) | |
tree | 05140f87f3a4030b64bd73b2c244fc8e664e74c3 | |
parent | 1f3602a2c9c3bfeea7cc8ee4d478c77dec349206 (diff) |
Drop unnecessary std::string
-rw-r--r-- | tests/unit-tests/test-util.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit-tests/test-util.cc b/tests/unit-tests/test-util.cc index e0738614e..a0fa7c109 100644 --- a/tests/unit-tests/test-util.cc +++ b/tests/unit-tests/test-util.cc @@ -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, ""); } /* ---------------------------------------------------------------------------- |