[clang-rename] Fix the failure rename test.

We cannot run two different tests in a single lit test, split into two.
This commit is contained in:
Haojian Wu 2020-02-11 10:05:52 +01:00
parent a7fd548a4f
commit 2733ad2c24
2 changed files with 10 additions and 13 deletions

View File

@ -5,23 +5,10 @@ public:
Foo::Foo() /* Test 2 */ {} // CHECK: Bar::Bar() /* Test 2 */ {}
class Foo2 { /* Test 3 */ // CHECK: class Bar2 {
public:
template <typename T>
Foo2(); // CHECK: Bar2();
template <typename T>
Foo2(Foo2 &); // CHECK: Bar2(Bar2 &);
};
// Test 1.
// RUN: clang-rename -offset=62 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
// Test 2.
// RUN: clang-rename -offset=116 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
// Test 3.
// RUN: clang-rename -offset=187 -new-name=Bar2 %s -- | sed 's,//.*,,' | FileCheck %s
// To find offsets after modifying the file, use:
// grep -Ubo 'Foo.*' <file>

View File

@ -0,0 +1,10 @@
class Foo { // CHECK: class Bar {
public:
template <typename T>
Foo(); // CHECK: Bar();
template <typename T>
Foo(Foo &); // CHECK: Bar(Bar &);
};
// RUN: clang-rename -offset=6 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s