From e256ce8ea8c6ab4aacfb3c577b34ee0fb2244011 Mon Sep 17 00:00:00 2001 From: amai2012 Date: Thu, 19 Apr 2018 14:35:26 +0200 Subject: [PATCH] Add more tests for Path::isAbsolute --- test/testpath.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/testpath.cpp b/test/testpath.cpp index 89706fd5d..0263f010f 100644 --- a/test/testpath.cpp +++ b/test/testpath.cpp @@ -82,6 +82,8 @@ private: ASSERT_EQUALS(false, Path::isAbsolute("foo.cpp")); ASSERT_EQUALS(false, Path::isAbsolute("C:foo.cpp")); ASSERT_EQUALS(false, Path::isAbsolute("C:foo\\bar.cpp")); + ASSERT_EQUALS(false, Path::isAbsolute("bar.cpp")); + TODO_ASSERT_EQUALS(true, false, Path::isAbsolute("\\")); #else ASSERT_EQUALS(true, Path::isAbsolute("/foo/bar")); ASSERT_EQUALS(true, Path::isAbsolute("/")); @@ -91,7 +93,7 @@ private: } void getRelative() const { - std::vector basePaths = { + const std::vector basePaths = { "", // Don't crash with empty paths "C:/foo", "C:/bar/",