[PATCH] D20059: clang-rename tests: move the run lines to the top of the test files

Miklos Vajna via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 01:30:13 PDT 2016


vmiklos created this revision.
vmiklos added reviewers: cfe-commits, klimek.

To be consistent with the other tests.

http://reviews.llvm.org/D20059

Files:
  test/clang-rename/ClassTest.cpp
  test/clang-rename/FieldTest.cpp
  test/clang-rename/VarTest.cpp

Index: test/clang-rename/VarTest.cpp
===================================================================
--- test/clang-rename/VarTest.cpp
+++ test/clang-rename/VarTest.cpp
@@ -1,8 +1,8 @@
-namespace A { int foo;  // CHECK: int hector;
-}
 // RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=18 -new-name=hector %t.cpp -i --
+// RUN: clang-rename -offset=150 -new-name=hector %t.cpp -i --
 // RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
+namespace A { int foo;  // CHECK: int hector;
+}
 int foo;  // CHECK: int foo;
 int bar = foo; // CHECK: bar = foo;
 int baz = A::foo; // CHECK: baz = A::hector;
Index: test/clang-rename/FieldTest.cpp
===================================================================
--- test/clang-rename/FieldTest.cpp
+++ test/clang-rename/FieldTest.cpp
@@ -1,12 +1,12 @@
+// RUN: cat %s > %t.cpp
+// RUN: clang-rename -offset=150 -new-name=hector %t.cpp -i --
+// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
 class Cla
 {
   int foo; // CHECK: hector;
 public:
   Cla();
 };
-// RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=18 -new-name=hector %t.cpp -i --
-// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
 
 Cla::Cla()
   : foo(0) // CHECK: hector(0)
Index: test/clang-rename/ClassTest.cpp
===================================================================
--- test/clang-rename/ClassTest.cpp
+++ test/clang-rename/ClassTest.cpp
@@ -1,9 +1,9 @@
+// RUN: cat %s > %t.cpp
+// RUN: clang-rename -offset=138 -new-name=Hector %t.cpp -i --
+// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
 class Cla  // CHECK: class Hector
 {
 };
-// RUN: cat %s > %t.cpp
-// RUN: clang-rename -offset=6 -new-name=Hector %t.cpp -i --
-// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s
 
 int main()
 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20059.56537.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160509/b0e2d14e/attachment-0001.bin>


More information about the cfe-commits mailing list