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

Unified Diff: tests/compiler/dart2js/resolver_test.dart

Issue 365043002: Add ResolutionResult as intermediate value in ResolutionVisitor and use it to mark assert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/resolver_test.dart
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 0bd931a423d0a0574aa881e7570225d5fd85ca3a..34ae21dc12124e6cfb446e3e2b5bef0c69bcbf2f 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -39,7 +39,8 @@ createLocals(List variables) {
Future testLocals(List variables) {
return MockCompiler.create((MockCompiler compiler) {
ResolverVisitor visitor = compiler.resolverVisitor();
- Element element = visitor.visit(createLocals(variables));
+ ResolutionResult result = visitor.visit(createLocals(variables));
+ Element element = result != null ? result.element : null;
// A VariableDefinitions does not have an element.
Expect.equals(null, element);
Expect.equals(variables.length, map(visitor).length);
@@ -47,7 +48,9 @@ Future testLocals(List variables) {
for (final variable in variables) {
final name = variable[0];
Identifier id = buildIdentifier(name);
- final VariableElement variableElement = visitor.visit(id);
+ ResolutionResult result = visitor.visit(id);
+ final VariableElement variableElement =
+ result != null ? result.element : null;
MethodScope scope = visitor.scope;
Expect.equals(variableElement, scope.elements[name]);
}

Powered by Google App Engine
This is Rietveld 408576698