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

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

Issue 3007783004: Handle switch continue (Closed)
Patch Set: Updated cf. comment Created 3 years, 4 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: tests/compiler/dart2js/equivalence/id_equivalence_test.dart
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_test.dart b/tests/compiler/dart2js/equivalence/id_equivalence_test.dart
index a089fe6aa115a8646ec45e50ac4bc766f414259e..8512dca5ed691a778e573f289af9e0cfdd478773 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_test.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_test.dart
@@ -107,6 +107,10 @@ class ComputerMixin {
String get loopName => 'loop';
String get gotoName => 'goto';
+
+ String get switchName => 'switch';
+
+ String get switchCaseName => 'case';
}
/// AST visitor for computing a descriptive mapping of the [Id]s in a member.
@@ -124,6 +128,10 @@ class ResolvedAstComputer extends AstDataExtractor with ComputerMixin {
return loopName;
} else if (node is ast.GotoStatement) {
return gotoName;
+ } else if (node is ast.SwitchStatement) {
+ return switchName;
+ } else if (node is ast.SwitchCase) {
+ return switchCaseName;
}
dynamic sendStructure;
@@ -221,6 +229,12 @@ class IrComputer extends IrDataExtractor with ComputerMixin {
return loopName;
} else if (node is ir.BreakStatement) {
return gotoName;
+ } else if (node is ir.ContinueSwitchStatement) {
+ return gotoName;
+ } else if (node is ir.SwitchStatement) {
+ return switchName;
+ } else if (node is ir.SwitchCase) {
+ return switchCaseName;
}
return '<unknown:$node (${node.runtimeType})>';
}
« no previous file with comments | « tests/compiler/dart2js/equivalence/id_equivalence_helper.dart ('k') | tests/compiler/dart2js/inference/inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698