Alex Lorenz | ad38fbf | 2017-10-13 01:53:13 +0000 | [diff] [blame^] | 1 | // RUN: clang-refactor local-rename -selection=test:%s -new-name=test -v %s -- | FileCheck %s |
Alex Lorenz | b54ef6a | 2017-09-14 10:06:52 +0000 | [diff] [blame] | 2 | |
| 3 | /*range=*/int test; |
| 4 | |
| 5 | /*range named=*/int test2; |
| 6 | |
| 7 | /*range= +1*/int test3; |
| 8 | |
| 9 | /* range = +100 */int test4; |
| 10 | |
| 11 | /*range named =+0*/int test5; |
| 12 | |
| 13 | // CHECK: Test selection group '': |
Alex Lorenz | ad38fbf | 2017-10-13 01:53:13 +0000 | [diff] [blame^] | 14 | // CHECK-NEXT: 105-105 |
| 15 | // CHECK-NEXT: 158-158 |
| 16 | // CHECK-NEXT: 197-197 |
Alex Lorenz | b54ef6a | 2017-09-14 10:06:52 +0000 | [diff] [blame] | 17 | // CHECK-NEXT: Test selection group 'named': |
Alex Lorenz | ad38fbf | 2017-10-13 01:53:13 +0000 | [diff] [blame^] | 18 | // CHECK-NEXT: 132-132 |
| 19 | // CHECK-NEXT: 218-218 |
Alex Lorenz | b54ef6a | 2017-09-14 10:06:52 +0000 | [diff] [blame] | 20 | |
| 21 | // The following invocations are in the default group: |
| 22 | |
| 23 | // CHECK: invoking action 'local-rename': |
| 24 | // CHECK-NEXT: -selection={{.*}}tool-test-support.c:3:11 |
| 25 | |
| 26 | // CHECK: invoking action 'local-rename': |
| 27 | // CHECK-NEXT: -selection={{.*}}tool-test-support.c:7:15 |
| 28 | |
| 29 | // CHECK: invoking action 'local-rename': |
| 30 | // CHECK-NEXT: -selection={{.*}}tool-test-support.c:9:29 |
| 31 | |
| 32 | |
| 33 | // The following invocations are in the 'named' group, and they follow |
| 34 | // the default invocation even if some of their ranges occur prior to the |
| 35 | // ranges from the default group because the groups are tested one-by-one: |
| 36 | |
| 37 | // CHECK: invoking action 'local-rename': |
| 38 | // CHECK-NEXT: -selection={{.*}}tool-test-support.c:5:17 |
| 39 | |
| 40 | // CHECK: invoking action 'local-rename': |
| 41 | // CHECK-NEXT: -selection={{.*}}tool-test-support.c:11:20 |