diff options
author | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-08-10 13:28:30 +0000 |
---|---|---|
committer | Kirill Bobyrev <omtcyfz@gmail.com> | 2016-08-10 13:28:30 +0000 |
commit | 77f522cb42b4ec2112ea1b4534d82b02ea1f2b94 (patch) | |
tree | cda7444a1a089e960f69fa0b6efa5de1d07f9ac4 /clang-tools-extra/test/clang-rename/CtorInitializer.cpp | |
parent | e171ea8a33198c3b257c110a5fecc97acdbb5b52 (diff) | |
download | bcm5719-llvm-77f522cb42b4ec2112ea1b4534d82b02ea1f2b94.tar.gz bcm5719-llvm-77f522cb42b4ec2112ea1b4534d82b02ea1f2b94.zip |
[clang-rename] merge tests when possible
The only difference between some tests is -offset passed to clang-rename. It
makes sense to merge them into a single file and add multiple tool invocations.
Reviewers: alexfh
Differential Revision: https://reviews.llvm.org/D23158
llvm-svn: 278221
Diffstat (limited to 'clang-tools-extra/test/clang-rename/CtorInitializer.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-rename/CtorInitializer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/clang-tools-extra/test/clang-rename/CtorInitializer.cpp b/clang-tools-extra/test/clang-rename/CtorInitializer.cpp index 1fa16657950..fed4f5b06c2 100644 --- a/clang-tools-extra/test/clang-rename/CtorInitializer.cpp +++ b/clang-tools-extra/test/clang-rename/CtorInitializer.cpp @@ -1,16 +1,17 @@ -// RUN: cat %s > %t.cpp -// RUN: clang-rename -offset=163 -new-name=Bar %t.cpp -i -- -// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s - class Baz {}; class Qux { - Baz Foo; // CHECK: Baz Bar; + Baz Foo; /* Test 1 */ // CHECK: Baz Bar; public: Qux(); }; -Qux::Qux() : Foo() {} // CHECK: Qux::Qux() : Bar() {} +Qux::Qux() : Foo() /* Test 2 */ {} // CHECK: Qux::Qux() : Bar() /* Test 2 */ {} + +// Test 1. +// RUN: clang-rename -offset=33 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s +// Test 2. +// RUN: clang-rename -offset=118 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s -// Use grep -FUbo 'Foo' <file> to get the correct offset of foo when changing -// this file. +// To find offsets after modifying the file, use: +// grep -Ubo 'Foo.*' <file> |