From 0e0906c2218ab38d3b3391151c86fc570df42f14 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 20 Apr 2018 08:27:27 +0000 Subject: [PATCH] Move FileSpecTest to Utility FileSpec class was moved to the Utility module a while ago, but the test file was left behind. This corrects that. llvm-svn: 330405 --- lldb/unittests/Host/CMakeLists.txt | 1 - lldb/unittests/Utility/CMakeLists.txt | 1 + lldb/unittests/{Host => Utility}/FileSpecTest.cpp | 12 ++++++------ 3 files changed, 7 insertions(+), 7 deletions(-) rename lldb/unittests/{Host => Utility}/FileSpecTest.cpp (98%) diff --git a/lldb/unittests/Host/CMakeLists.txt b/lldb/unittests/Host/CMakeLists.txt index 238026b..a3f9762 100644 --- a/lldb/unittests/Host/CMakeLists.txt +++ b/lldb/unittests/Host/CMakeLists.txt @@ -1,5 +1,4 @@ set (FILES - FileSpecTest.cpp FileSystemTest.cpp HostInfoTest.cpp HostTest.cpp diff --git a/lldb/unittests/Utility/CMakeLists.txt b/lldb/unittests/Utility/CMakeLists.txt index f4627b0..f7731a7 100644 --- a/lldb/unittests/Utility/CMakeLists.txt +++ b/lldb/unittests/Utility/CMakeLists.txt @@ -4,6 +4,7 @@ add_lldb_unittest(UtilityTests CleanUpTest.cpp ConstStringTest.cpp EnvironmentTest.cpp + FileSpecTest.cpp JSONTest.cpp LogTest.cpp NameMatchesTest.cpp diff --git a/lldb/unittests/Host/FileSpecTest.cpp b/lldb/unittests/Utility/FileSpecTest.cpp similarity index 98% rename from lldb/unittests/Host/FileSpecTest.cpp rename to lldb/unittests/Utility/FileSpecTest.cpp index cb6877e..5177a6b 100644 --- a/lldb/unittests/Host/FileSpecTest.cpp +++ b/lldb/unittests/Utility/FileSpecTest.cpp @@ -167,7 +167,7 @@ TEST(FileSpecTest, EqualDotsWindows) { {R"(C:\foo\bar)", R"(C:\foo\bar\.)"}, }; - for(const auto &test: tests) { + for (const auto &test : tests) { FileSpec one(test.first, false, FileSpec::ePathSyntaxWindows); FileSpec two(test.second, false, FileSpec::ePathSyntaxWindows); EXPECT_NE(one, two); @@ -176,7 +176,6 @@ TEST(FileSpecTest, EqualDotsWindows) { Compare(one, two, !full_match, remove_backup_dots, match); Compare(one, two, !full_match, !remove_backup_dots, !match); } - } TEST(FileSpecTest, EqualDotsPosix) { @@ -191,7 +190,7 @@ TEST(FileSpecTest, EqualDotsPosix) { {R"(/foo/bar)", R"(/foo/bar/.)"}, }; - for(const auto &test: tests) { + for (const auto &test : tests) { FileSpec one(test.first, false, FileSpec::ePathSyntaxPosix); FileSpec two(test.second, false, FileSpec::ePathSyntaxPosix); EXPECT_NE(one, two); @@ -200,7 +199,6 @@ TEST(FileSpecTest, EqualDotsPosix) { Compare(one, two, !full_match, remove_backup_dots, match); Compare(one, two, !full_match, !remove_backup_dots, !match); } - } TEST(FileSpecTest, EqualDotsPosixRoot) { @@ -208,10 +206,12 @@ TEST(FileSpecTest, EqualDotsPosixRoot) { const bool remove_backup_dots = true; const bool match = true; std::pair tests[] = { - {R"(/)", R"(/..)"}, {R"(/)", R"(/.)"}, {R"(/)", R"(/foo/..)"}, + {R"(/)", R"(/..)"}, + {R"(/)", R"(/.)"}, + {R"(/)", R"(/foo/..)"}, }; - for(const auto &test: tests) { + for (const auto &test : tests) { FileSpec one(test.first, false, FileSpec::ePathSyntaxPosix); FileSpec two(test.second, false, FileSpec::ePathSyntaxPosix); EXPECT_NE(one, two); -- 2.7.4