Move FileSpecTest to Utility
authorPavel Labath <labath@google.com>
Fri, 20 Apr 2018 08:27:27 +0000 (08:27 +0000)
committerPavel Labath <labath@google.com>
Fri, 20 Apr 2018 08:27:27 +0000 (08:27 +0000)
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
lldb/unittests/Utility/CMakeLists.txt
lldb/unittests/Utility/FileSpecTest.cpp [moved from lldb/unittests/Host/FileSpecTest.cpp with 98% similarity]

index 238026b..a3f9762 100644 (file)
@@ -1,5 +1,4 @@
 set (FILES
-  FileSpecTest.cpp
   FileSystemTest.cpp
   HostInfoTest.cpp
   HostTest.cpp
index f4627b0..f7731a7 100644 (file)
@@ -4,6 +4,7 @@ add_lldb_unittest(UtilityTests
   CleanUpTest.cpp
   ConstStringTest.cpp
   EnvironmentTest.cpp
+  FileSpecTest.cpp
   JSONTest.cpp
   LogTest.cpp
   NameMatchesTest.cpp
similarity index 98%
rename from lldb/unittests/Host/FileSpecTest.cpp
rename to lldb/unittests/Utility/FileSpecTest.cpp
index cb6877e..5177a6b 100644 (file)
@@ -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<const char *, const char *> 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);