Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart

Issue 2973093002: Stop depending on LabelElement(s) to be reported in visitChildren(). (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
diff --git a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
index 89ab4c19a04ee4c752c560ef4f6332cbbc17e87d..659ed8f05b6541d1668b2497732776db5dc21ba9 100644
--- a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
@@ -354,7 +354,8 @@ enum E2 { three, four }''');
plugin.Element.FLAG_CONST | plugin.Element.FLAG_STATIC);
}
{
- analyzer.FieldElement engineElement = findElementInUnit(unit, 'index');
+ analyzer.FieldElement engineElement =
+ unit.element.enums[1].getField('index');
// create notification Element
plugin.Element element = converter.convertElement(engineElement);
expect(element.kind, plugin.ElementKind.FIELD);
@@ -372,7 +373,9 @@ enum E2 { three, four }''');
expect(element.flags, plugin.Element.FLAG_FINAL);
}
{
- analyzer.FieldElement engineElement = findElementInUnit(unit, 'values');
+ analyzer.FieldElement engineElement =
+ unit.element.enums[1].getField('values');
+
// create notification Element
plugin.Element element = converter.convertElement(engineElement);
expect(element.kind, plugin.ElementKind.FIELD);
@@ -509,9 +512,8 @@ class A {
set mySetter(String x) {}
}''');
analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
- analyzer.FieldElement engineFieldElement =
- findElementInUnit(unit, 'mySetter', analyzer.ElementKind.FIELD);
- analyzer.PropertyAccessorElement engineElement = engineFieldElement.setter;
+ analyzer.PropertyAccessorElement engineElement =
+ findElementInUnit(unit, 'mySetter', analyzer.ElementKind.SETTER);
// create notification Element
plugin.Element element = converter.convertElement(engineElement);
expect(element.kind, plugin.ElementKind.SETTER);

Powered by Google App Engine
This is Rietveld 408576698