Skip to content

Commit e1376f6

Browse files
committed
[element model] migrate local_variable_test
Change-Id: Ieb76215e052ff277cbac146f2f523832cc0eebf8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401984 Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 7a5174a commit e1376f6

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

pkg/analyzer/analyzer_use_new_elements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ test/src/dart/element/upper_lower_bound_test.dart
189189
test/src/dart/micro/simple_file_resolver_test.dart
190190
test/src/dart/resolution/constant_test.dart
191191
test/src/dart/resolution/generic_type_alias_test.dart
192-
test/src/dart/resolution/local_variable_test.dart
193192
test/src/dart/resolution/prefix_element_test.dart
194193
test/src/dart/resolution/resolution.dart
195194
test/src/dart/resolution/scope_test.dart

pkg/analyzer/test/src/dart/resolution/local_variable_test.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ void f() {
2626
}
2727
''');
2828

29-
var x = findElement.localVar('x');
30-
assertElement2(
31-
x.metadata.single.element,
32-
declaration: findElement.topGet('a'),
29+
var x = findElement2.localVar('x');
30+
assertElement3(
31+
x.metadata2.annotations.single.element2,
32+
declaration: findElement2.topGet('a'),
3333
);
3434

35-
var y = findElement.localVar('y');
36-
assertElement2(
37-
y.metadata.single.element,
38-
declaration: findElement.topGet('a'),
35+
var y = findElement2.localVar('y');
36+
assertElement3(
37+
y.metadata2.annotations.single.element2,
38+
declaration: findElement2.topGet('a'),
3939
);
4040
}
4141

@@ -62,7 +62,7 @@ void f() {
6262
error(WarningCode.UNUSED_LOCAL_VARIABLE, 17, 1),
6363
]);
6464

65-
var x = findElement.localVar('x');
65+
var x = findElement2.localVar('x');
6666
expect(x.isConst, isFalse);
6767
expect(x.isFinal, isFalse);
6868
expect(x.isLate, isFalse);
@@ -78,7 +78,7 @@ void f() {
7878
error(WarningCode.UNUSED_LOCAL_VARIABLE, 23, 1),
7979
]);
8080

81-
var x = findElement.localVar('x');
81+
var x = findElement2.localVar('x');
8282
expect(x.isConst, isTrue);
8383
expect(x.isFinal, isFalse);
8484
expect(x.isLate, isFalse);
@@ -94,7 +94,7 @@ void f() {
9494
error(WarningCode.UNUSED_LOCAL_VARIABLE, 23, 1),
9595
]);
9696

97-
var x = findElement.localVar('x');
97+
var x = findElement2.localVar('x');
9898
expect(x.isConst, isFalse);
9999
expect(x.isFinal, isTrue);
100100
expect(x.isLate, isFalse);
@@ -111,7 +111,7 @@ void f() {
111111
error(WarningCode.UNUSED_LOCAL_VARIABLE, 32, 1),
112112
]);
113113

114-
var x = findElement.localVar('x');
114+
var x = findElement2.localVar('x');
115115
expect(x.isConst, isFalse);
116116
expect(x.isFinal, isFalse);
117117
expect(x.isLate, isFalse);
@@ -127,7 +127,7 @@ void f() {
127127
error(WarningCode.UNUSED_LOCAL_VARIABLE, 22, 1),
128128
]);
129129

130-
var x = findElement.localVar('x');
130+
var x = findElement2.localVar('x');
131131
expect(x.isConst, isFalse);
132132
expect(x.isFinal, isFalse);
133133
expect(x.isLate, isTrue);

0 commit comments

Comments
 (0)