Skip to content

Commit f4dba4a

Browse files
committed
testrunner: Remove TestPath::simplify_path as these tests has been moved to simplecpp
1 parent dc37034 commit f4dba4a

1 file changed

Lines changed: 4 additions & 50 deletions

File tree

test/testpath.cpp

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class TestPath : public TestFixture {
3030
private:
3131

3232
void run() {
33-
TEST_CASE(simplify_path);
34-
TEST_CASE(accept_file);
33+
TEST_CASE(removeQuotationMarks);
34+
TEST_CASE(acceptFile);
3535
TEST_CASE(getCurrentPath);
3636
TEST_CASE(isAbsolute);
3737
TEST_CASE(getRelative);
@@ -40,53 +40,7 @@ class TestPath : public TestFixture {
4040
TEST_CASE(get_path_from_filename);
4141
}
4242

43-
void simplify_path() const {
44-
// Path::simplifyPath()
45-
ASSERT_EQUALS("index.h", Path::simplifyPath("index.h"));
46-
ASSERT_EQUALS("index.h", Path::simplifyPath("./index.h"));
47-
ASSERT_EQUALS("index.h", Path::simplifyPath(".//index.h"));
48-
ASSERT_EQUALS("index.h", Path::simplifyPath(".///index.h"));
49-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/index.h"));
50-
ASSERT_EQUALS("/path/", Path::simplifyPath("/path/"));
51-
ASSERT_EQUALS("/", Path::simplifyPath("/"));
52-
ASSERT_EQUALS("/", Path::simplifyPath("/."));
53-
ASSERT_EQUALS("/", Path::simplifyPath("/./"));
54-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/./index.h"));
55-
ASSERT_EQUALS("/", Path::simplifyPath("/.//"));
56-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/.//index.h"));
57-
ASSERT_EQUALS("../index.h", Path::simplifyPath("../index.h"));
58-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path/../index.h"));
59-
ASSERT_EQUALS("index.h", Path::simplifyPath("./path/../index.h"));
60-
ASSERT_EQUALS("index.h", Path::simplifyPath("path/../index.h"));
61-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path//../index.h"));
62-
ASSERT_EQUALS("index.h", Path::simplifyPath("./path//../index.h"));
63-
ASSERT_EQUALS("index.h", Path::simplifyPath("path//../index.h"));
64-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path/..//index.h"));
65-
ASSERT_EQUALS("index.h", Path::simplifyPath("./path/..//index.h"));
66-
ASSERT_EQUALS("index.h", Path::simplifyPath("path/..//index.h"));
67-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path//..//index.h"));
68-
ASSERT_EQUALS("index.h", Path::simplifyPath("./path//..//index.h"));
69-
ASSERT_EQUALS("index.h", Path::simplifyPath("path//..//index.h"));
70-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path/../other/../index.h"));
71-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path/../other///././../index.h"));
72-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path/../other/././..///index.h"));
73-
ASSERT_EQUALS("/index.h", Path::simplifyPath("/path/../other///././..///index.h"));
74-
ASSERT_EQUALS("../path/index.h", Path::simplifyPath("../path/other/../index.h"));
75-
ASSERT_EQUALS("a/index.h", Path::simplifyPath("a/../a/index.h"));
76-
ASSERT_EQUALS(".", Path::simplifyPath("a/.."));
77-
ASSERT_EQUALS(".", Path::simplifyPath("./a/.."));
78-
ASSERT_EQUALS("../../src/test.cpp", Path::simplifyPath("../../src/test.cpp"));
79-
ASSERT_EQUALS("../../../src/test.cpp", Path::simplifyPath("../../../src/test.cpp"));
80-
ASSERT_EQUALS("src/test.cpp", Path::simplifyPath(".//src/test.cpp"));
81-
ASSERT_EQUALS("src/test.cpp", Path::simplifyPath(".///src/test.cpp"));
82-
ASSERT_EQUALS("test.cpp", Path::simplifyPath("./././././test.cpp"));
83-
ASSERT_EQUALS("src/", Path::simplifyPath("src/abc/.."));
84-
ASSERT_EQUALS("src/", Path::simplifyPath("src/abc/../"));
85-
86-
// Handling of UNC paths on Windows
87-
ASSERT_EQUALS("//src/test.cpp", Path::simplifyPath("//src/test.cpp"));
88-
ASSERT_EQUALS("//src/test.cpp", Path::simplifyPath("///src/test.cpp"));
89-
43+
void removeQuotationMarks() const {
9044
// Path::removeQuotationMarks()
9145
ASSERT_EQUALS("index.cpp", Path::removeQuotationMarks("index.cpp"));
9246
ASSERT_EQUALS("index.cpp", Path::removeQuotationMarks("\"index.cpp"));
@@ -98,7 +52,7 @@ class TestPath : public TestFixture {
9852
ASSERT_EQUALS("the/path to/index.cpp", Path::removeQuotationMarks("\"the/path to/index.cpp\""));
9953
}
10054

101-
void accept_file() const {
55+
void acceptFile() const {
10256
ASSERT(Path::acceptFile("index.cpp"));
10357
ASSERT(Path::acceptFile("index.invalid.cpp"));
10458
ASSERT(Path::acceptFile("index.invalid.Cpp"));

0 commit comments

Comments
 (0)