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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 2001903002: Make imports resynthesizing completely lazy. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/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 ad450a45d39bddc88fc03d96606944c9e7e25bcd..3ec9dbdca9c34a531a42953d35ccbb49eab2b823 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -783,15 +783,18 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
ImportElementImpl original, String desc) {
compareUriReferencedElements(resynthesized, original, desc);
expect(resynthesized.importedLibrary.location,
- original.importedLibrary.location);
- expect(resynthesized.prefixOffset, original.prefixOffset);
+ original.importedLibrary.location,
+ reason: '$desc importedLibrary location');
+ expect(resynthesized.prefixOffset, original.prefixOffset,
+ reason: '$desc prefixOffset');
if (original.prefix == null) {
- expect(resynthesized.prefix, isNull);
+ expect(resynthesized.prefix, isNull, reason: '$desc prefix');
} else {
comparePrefixElements(
resynthesized.prefix, original.prefix, original.prefix.name);
}
- expect(resynthesized.combinators.length, original.combinators.length);
+ expect(resynthesized.combinators.length, original.combinators.length,
+ reason: '$desc combinators');
for (int i = 0; i < resynthesized.combinators.length; i++) {
compareNamespaceCombinators(
resynthesized.combinators[i], original.combinators[i]);
@@ -858,12 +861,14 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
NamespaceCombinator resynthesized, NamespaceCombinator original) {
if (original is ShowElementCombinatorImpl &&
resynthesized is ShowElementCombinatorImpl) {
- expect(resynthesized.shownNames, original.shownNames);
- expect(resynthesized.offset, original.offset);
- expect(resynthesized.end, original.end);
+ expect(resynthesized.shownNames, original.shownNames,
+ reason: 'shownNames');
+ expect(resynthesized.offset, original.offset, reason: 'offset');
+ expect(resynthesized.end, original.end, reason: 'end');
} else if (original is HideElementCombinatorImpl &&
resynthesized is HideElementCombinatorImpl) {
- expect(resynthesized.hiddenNames, original.hiddenNames);
+ expect(resynthesized.hiddenNames, original.hiddenNames,
+ reason: 'hiddenNames');
} else if (resynthesized.runtimeType != original.runtimeType) {
fail(
'Type mismatch: expected ${original.runtimeType}, got ${resynthesized.runtimeType}');

Powered by Google App Engine
This is Rietveld 408576698