| 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 3f6d6536ee097af4b7f4f35e66965121933a6fac..c1f3cbe7672f0eef18211d6e21a22dd191205793 100644
|
| --- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| +++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| @@ -865,6 +865,11 @@ class ResynthTest extends ResolverTestCase {
|
| VariableElement resynthesized, VariableElement original, String desc) {
|
| compareElements(resynthesized, original, desc);
|
| compareTypes(resynthesized.type, original.type, desc);
|
| + // TODO(scheglov) VariableMember.initializer is not implemented
|
| + if (original is! VariableMember) {
|
| + compareVariableInitializers(
|
| + resynthesized.initializer, original.initializer, desc);
|
| + }
|
| VariableElementImpl originalActual = getActualElement(original, desc);
|
| if (originalActual is ConstVariableElement) {
|
| VariableElementImpl resynthesizedActual =
|
| @@ -881,6 +886,18 @@ class ResynthTest extends ResolverTestCase {
|
| checkPossibleLocalElements(resynthesized, original);
|
| }
|
|
|
| + void compareVariableInitializers(
|
| + FunctionElement resynthesized, FunctionElement original, String desc) {
|
| + if (original == null && resynthesized == null) {
|
| + return;
|
| + }
|
| + expect(resynthesized, isNotNull, reason: desc);
|
| + expect(resynthesized.nameOffset, original.nameOffset, reason: desc);
|
| + expect(resynthesized.name, original.name, reason: desc);
|
| + // TODO(scheglov) replace this method with compareFunctionElements()
|
| + // once we resynthesize initializers return types.
|
| + }
|
| +
|
| /**
|
| * Serialize the given [library] into a summary. Then create a
|
| * [_TestSummaryResynthesizer] which can deserialize it, along with any
|
|
|