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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 2025233003: Rename ClassElementImpl and its subclasses. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/constant/value.dart'; 10 import 'package:analyzer/dart/constant/value.dart';
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 } else { 197 } else {
198 expect( 198 expect(
199 resynthesizedNonHandle, isNot(new isInstanceOf<ConstructorMember>()), 199 resynthesizedNonHandle, isNot(new isInstanceOf<ConstructorMember>()),
200 reason: desc); 200 reason: desc);
201 } 201 }
202 } 202 }
203 203
204 void compareClassElements( 204 void compareClassElements(
205 ClassElement resynthesized, ClassElement original, String desc) { 205 ClassElement resynthesized, ClassElement original, String desc) {
206 ClassElementImpl r = ClassElementImpl.getImpl(resynthesized); 206 AbstractClassElementImpl r = AbstractClassElementImpl.getImpl(resynthesized) ;
207 ClassElementImpl o = ClassElementImpl.getImpl(original); 207 AbstractClassElementImpl o = AbstractClassElementImpl.getImpl(original);
208 compareElements(r, o, desc); 208 compareElements(r, o, desc);
209 expect(r.fields.length, o.fields.length, reason: '$desc fields.length'); 209 expect(r.fields.length, o.fields.length, reason: '$desc fields.length');
210 for (int i = 0; i < r.fields.length; i++) { 210 for (int i = 0; i < r.fields.length; i++) {
211 String name = o.fields[i].name; 211 String name = o.fields[i].name;
212 compareFieldElements(r.fields[i], o.fields[i], '$desc.field $name'); 212 compareFieldElements(r.fields[i], o.fields[i], '$desc.field $name');
213 } 213 }
214 compareTypes(r.supertype, o.supertype, '$desc supertype'); 214 compareTypes(r.supertype, o.supertype, '$desc supertype');
215 expect(r.interfaces.length, o.interfaces.length, 215 expect(r.interfaces.length, o.interfaces.length,
216 reason: '$desc interfaces.length'); 216 reason: '$desc interfaces.length');
217 for (int i = 0; i < r.interfaces.length; i++) { 217 for (int i = 0; i < r.interfaces.length; i++) {
(...skipping 4385 matching lines...) Expand 10 before | Expand all | Expand 10 after
4603 fail('Unexpectedly tried to get unlinked summary for $uri'); 4603 fail('Unexpectedly tried to get unlinked summary for $uri');
4604 } 4604 }
4605 return serializedUnit; 4605 return serializedUnit;
4606 } 4606 }
4607 4607
4608 @override 4608 @override
4609 bool hasLibrarySummary(String uri) { 4609 bool hasLibrarySummary(String uri) {
4610 return true; 4610 return true;
4611 } 4611 }
4612 } 4612 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698