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

Unified Diff: tests/compiler/dart2js/equivalence/id_equivalence_helper.dart

Issue 3009043002: Handle variable declarations in inferrer (Closed)
Patch Set: Created 3 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | tests/compiler/dart2js/inference/data/locals.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index f634354352b834f3ebd362861c3700fa014d73de..b5b61af76e049f89135ce03bf2ea11f2057d4401 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -130,8 +130,9 @@ class IdData {
String get diffCode {
Map<int, List<String>> annotations = <int, List<String>>{};
actualMap.forEach((Id id, ActualData data) {
- String expected = expectedMap[id]?.value ?? '';
- if (data.value != expected) {
+ IdValue value = expectedMap[id];
+ if (data.value != value || value == null && data.value.value != '') {
+ String expected = value?.toString() ?? '';
annotations
.putIfAbsent(data.sourceSpan.begin, () => [])
.add('${expected} | ${data.value}');
@@ -256,6 +257,11 @@ Future checkCode(
'Expected $expected for id $id missing in ${data.actualMap.keys}');
}
});
+ if (missingIds.isNotEmpty) {
+ print('--annotations diff--------------------------------------------');
+ print(data.diffCode);
+ print('--------------------------------------------------------------');
+ }
Expect.isTrue(missingIds.isEmpty, "Ids not found: ${missingIds}.");
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | tests/compiler/dart2js/inference/data/locals.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698