Added new <stout/path> test to the libprocess Makefile.

Review: https://reviews.apache.org/r/27946


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7cec663f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7cec663f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7cec663f

Branch: refs/heads/master
Commit: 7cec663fa0cebee10c0a84413c24e1d0e5fa3f52
Parents: fea2735
Author: Cody Maloney <[email protected]>
Authored: Thu Nov 13 11:06:05 2014 -0800
Committer: Benjamin Mahler <[email protected]>
Committed: Thu Nov 13 11:06:05 2014 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/Makefile.am                |  1 +
 3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp | 10 ++++------
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7cec663f/3rdparty/libprocess/3rdparty/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/Makefile.am 
b/3rdparty/libprocess/3rdparty/Makefile.am
index 0dc2871..85170a1 100644
--- a/3rdparty/libprocess/3rdparty/Makefile.am
+++ b/3rdparty/libprocess/3rdparty/Makefile.am
@@ -163,6 +163,7 @@ stout_tests_SOURCES =                               \
   $(STOUT)/tests/none_tests.cpp                        \
   $(STOUT)/tests/option_tests.cpp              \
   $(STOUT)/tests/os_tests.cpp                  \
+  $(STOUT)/tests/path_tests.cpp                        \
   $(STOUT)/tests/protobuf_tests.cpp            \
   $(STOUT)/tests/protobuf_tests.pb.cc          \
   $(STOUT)/tests/protobuf_tests.pb.h           \

http://git-wip-us.apache.org/repos/asf/mesos/blob/7cec663f/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp 
b/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
index 18dd8e7..cf35412 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
+++ b/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
@@ -24,14 +24,12 @@ using std::vector;
 
 TEST(PathTest, Join)
 {
-  // Raw strings and std::strings can be mixed.
   EXPECT_EQ("a/b/c", path::join("a", "b", "c"));
-  EXPECT_EQ("a/b/c", path::join(string("a"), string("b"), string("c")));
-  EXPECT_EQ("a/b/c", path::join(string("a"), "b", string("c")));
+  EXPECT_EQ("/a/b/c", path::join("/a", "b", "c"));
 
-  // Joining a vector of strings.
-  EXPECT_EQ("a/b/c", path::join(vector<string>({"a", "b", "c"})));
   EXPECT_EQ("", path::join(vector<string>()));
+  EXPECT_EQ("a/b/c", path::join(vector<string>({"a", "b", "c"})));
+
   //TODO(cmaloney): This should join to ""
   EXPECT_EQ("/", path::join(vector<string>({"", "", ""})));
 
@@ -39,7 +37,7 @@ TEST(PathTest, Join)
   EXPECT_EQ("/asdf", path::join("/", "asdf"));
   EXPECT_EQ("/", path::join("", "/", ""));
 
-  // Check trailing and leading slashes get cleaned up how we expect.
+  // Check trailing and leading slashes get cleaned up.
   EXPECT_EQ("a/b/c/", path::join("a/", "b/", "c/"));
   EXPECT_EQ("/a/b/c", path::join("/a", "/b", "/c"));
   EXPECT_EQ("/a/b/c/", path::join("/a/", "/b/", "/c/"));

Reply via email to