From 863fb2018be9614aaa00bd6af21a1996e1ffe094 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 18 Jun 2014 20:09:58 -0400 Subject: [PATCH] more Path tests --- test/src/test_Path.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/src/test_Path.cc b/test/src/test_Path.cc index 43f15b5..7271bf8 100644 --- a/test/src/test_Path.cc +++ b/test/src/test_Path.cc @@ -8,3 +8,16 @@ TEST(PathTest, construct_from_const_char_ptr) Path p("/a/b/c"); EXPECT_EQ("/a/b/c", p.to_s()); } + +TEST(PathTest, construct_from_std_string) +{ + std::string s("file.c"); + Path p(s); + EXPECT_EQ(p.to_s(), "file.c"); +} + +TEST(PathTest, convert_backslashes_to_forward_slashes) +{ + Path p("C:\\foo\\bar.txt"); + EXPECT_EQ("C:/foo/bar.txt", p.to_s()); +}