Index: pkg/analyzer/test/src/summary/resynthesize_test.dart |
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
index 7e682a9bf25c43f04f9e0254a64f68fa6f61aea4..2fec70b384eccbbc648b3eef6915d1bdd4ebe514 100644 |
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart |
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
@@ -233,9 +233,11 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest { |
} |
expect(r.accessors.length, o.accessors.length, |
reason: '$desc accessors.length'); |
+ List<PropertyAccessorElement> rAccessors = _getSortedPropertyAccessors(r); |
+ List<PropertyAccessorElement> oAccessors = _getSortedPropertyAccessors(o); |
for (int i = 0; i < r.accessors.length; i++) { |
- comparePropertyAccessorElements(r.accessors[i], o.accessors[i], |
- '$desc accessor ${o.accessors[i].name}'); |
+ comparePropertyAccessorElements( |
+ rAccessors[i], oAccessors[i], '$desc accessor ${oAccessors[i].name}'); |
} |
expect(r.methods.length, o.methods.length, reason: '$desc methods.length'); |
for (int i = 0; i < r.methods.length; i++) { |
@@ -1237,6 +1239,13 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest { |
expect(identifier.staticElement, isNull, reason: desc); |
} |
+ List<PropertyAccessorElement> _getSortedPropertyAccessors( |
+ ClassElement classElement) { |
+ List<PropertyAccessorElement> accessors = classElement.accessors.toList(); |
+ accessors.sort((a, b) => a.displayName.compareTo(b.displayName)); |
+ return accessors; |
+ } |
+ |
bool _hasModifier(Element element, Modifier modifier) { |
if (modifier == Modifier.ABSTRACT) { |
if (element is ClassElement) { |