24 lines
438 B
C++
24 lines
438 B
C++
#include "gtest/gtest.h"
|
|
#include "jes/Path.h"
|
|
|
|
using namespace jes;
|
|
|
|
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());
|
|
}
|