Move ClassReplacements.cpp test from clang-rename tests to the
authorAlex Lorenz <arphaman@gmail.com>
Fri, 30 Jun 2017 16:58:36 +0000 (16:58 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 30 Jun 2017 16:58:36 +0000 (16:58 +0000)
clang-apply-replacements tests

The ClassReplacements.cpp test in the clang-rename tests uses
clang-apply-replacements. I moved it back to the clang-tools-extra repository
for now to ensure that the clang-rename tests can pass when clang is compiled
without clang-tools-extra.

llvm-svn: 306843

clang-tools-extra/test/CMakeLists.txt
clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp [new file with mode: 0644]
clang/test/clang-rename/ClassReplacements.cpp [deleted file]

index 16541f98470bccf83e573ac7a303db3afd92022a..996afec2b1c2c83af83b8e117e11428f1fc3198f 100644 (file)
@@ -36,6 +36,8 @@ set(CLANG_TOOLS_TEST_DEPS
 
   # For the clang-tidy libclang integration test.
   c-index-test
+  # For the clang-apply-replacements test that uses clang-rename.
+  clang-rename
 
   # Individual tools we test.
   clang-apply-replacements
diff --git a/clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp b/clang-tools-extra/test/clang-apply-replacements/ClangRenameClassReplacements.cpp
new file mode 100644 (file)
index 0000000..2b478bb
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/fixes
+// RUN: cat %s > %t.cpp
+// RUN: clang-rename -offset=254 -new-name=Bar -export-fixes=%t/fixes/clang-rename.yaml %t.cpp --
+// RUN: clang-apply-replacements %t
+// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
+
+class Foo {}; // CHECK: class Bar {};
+
+// Use grep -FUbo 'Foo' <file> to get the correct offset of Cla when changing
+// this file.
diff --git a/clang/test/clang-rename/ClassReplacements.cpp b/clang/test/clang-rename/ClassReplacements.cpp
deleted file mode 100644 (file)
index 2b478bb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: rm -rf %t
-// RUN: mkdir -p %t/fixes
-// RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=254 -new-name=Bar -export-fixes=%t/fixes/clang-rename.yaml %t.cpp --
-// RUN: clang-apply-replacements %t
-// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
-
-class Foo {}; // CHECK: class Bar {};
-
-// Use grep -FUbo 'Foo' <file> to get the correct offset of Cla when changing
-// this file.