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

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

Issue 1149403009: Refactoring resolution of local access and unqualified access of statics (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix after rebase Created 5 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 f7981843e5baeb07ab86db21398c77daf026522d..5084fe33b073c81ef11df62898666efe78ca7d4c 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -337,7 +337,7 @@ Future testLocalsThree() {
Expect.equals(const NoneResult(), result);
MethodScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
- Expect.equals(3, map(visitor).length);
+ Expect.equals(2, map(visitor).length);
List<Element> elements = map(visitor).values.toList();
Expect.equals(elements[0], elements[1]);
});
@@ -366,7 +366,7 @@ Future testLocalsFive() {
Expect.equals(const NoneResult(), result);
MethodScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
- Expect.equals(6, map(visitor).length);
+ Expect.equals(4, map(visitor).length);
Block thenPart = tree.thenPart;
List statements1 = thenPart.statements.nodes.toList();
@@ -419,7 +419,7 @@ Future testFor() {
MethodScope scope = visitor.scope;
Expect.equals(0, scope.elements.length);
- Expect.equals(9, map(visitor).length);
+ Expect.equals(7, map(visitor).length);
VariableDefinitions initializer = tree.initializer;
Node iNode = initializer.definitions.nodes.head;
@@ -437,35 +437,27 @@ Future testFor() {
// for (int i = 0; i < 10; i = i + 1) { i = 5; };
// ^
- checkIdentifier(iElement, nodes[1], elements[1]);
-
- // for (int i = 0; i < 10; i = i + 1) { i = 5; };
- // ^
- checkSend(iElement, nodes[2], elements[2]);
+ checkSend(iElement, nodes[1], elements[1]);
// for (int i = 0; i < 10; i = i + 1) { i = 5; };
// ^
- checkIdentifier(iElement, nodes[3], elements[3]);
-
- // for (int i = 0; i < 10; i = i + 1) { i = 5; };
- // ^
- checkIdentifier(iElement, nodes[4], elements[4]);
+ checkIdentifier(iElement, nodes[2], elements[2]);
// for (int i = 0; i < 10; i = i + 1) { i = 5; };
// ^
- checkSend(iElement, nodes[5], elements[5]);
+ checkSend(iElement, nodes[3], elements[3]);
// for (int i = 0; i < 10; i = i + 1) { i = 5; };
// ^^^^^^^^^
- checkSendSet(iElement, nodes[6], elements[6]);
+ checkSendSet(iElement, nodes[4], elements[4]);
// for (int i = 0; i < 10; i = i + 1) { i = 5; };
// ^
- checkIdentifier(iElement, nodes[7], elements[7]);
+ checkIdentifier(iElement, nodes[5], elements[5]);
// for (int i = 0; i < 10; i = i + 1) { i = 5; };
// ^^^^^
- checkSendSet(iElement, nodes[8], elements[8]);
+ checkSendSet(iElement, nodes[6], elements[6]);
});
}
@@ -927,7 +919,7 @@ Future testInitializers() {
int bar;
A() : this.foo = bar;
}""";
- return resolveConstructor(script, "A a = new A();", "A", "", 3,
+ return resolveConstructor(script, "A a = new A();", "A", "", 2,
expectedWarnings: [],
expectedErrors: [MessageKind.NO_INSTANCE_AVAILABLE]);
},
« no previous file with comments | « tests/compiler/dart2js/diagnose_ambiguous_test.dart ('k') | tests/compiler/dart2js/semantic_visitor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698