30 #include <gtest/gtest.h> 32 TEST(GetBaseName, simpleName)
34 std::string in(
"foo");
35 std::string expected(
"foo");
39 ASSERT_EQ(expected, out);
42 TEST(GetBaseName, leadingSlash)
44 std::string in(
"/foo");
45 std::string expected(
"foo");
49 ASSERT_EQ(expected, out);
52 TEST(GetBaseName, trailingSlash)
54 std::string in(
"foo/");
55 std::string expected(
"foo");
59 ASSERT_EQ(expected, out);
62 TEST(GetBaseName, multipleLevels)
64 std::string in(
"bar/bat/baz/foo");
65 std::string expected(
"foo");
69 ASSERT_EQ(expected, out);
72 TEST(GetBaseName, multipleSlashes)
74 std::string in(
"//bar///bat/baz/foo///");
75 std::string expected(
"foo");
79 ASSERT_EQ(expected, out);
82 TEST(GetBaseName, emptyName)
84 std::string in(
"///");
90 int main(
int argc,
char **argv)
92 testing::InitGoogleTest(&argc, argv);
93 return RUN_ALL_TESTS();
TEST(GetBaseName, simpleName)
int main(int argc, char **argv)