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

Side by Side Diff: pkg/analyzer/test/generated/utilities_test.dart

Issue 1216463002: [analyzer] fix NodeReplacer for AwaitExpression (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.utilities_test; 8 library engine.utilities_test;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 @override 1936 @override
1937 Expression get(AssignmentExpression node) => node.rightHandSide; 1937 Expression get(AssignmentExpression node) => node.rightHandSide;
1938 } 1938 }
1939 1939
1940 class Getter_NodeReplacerTest_test_assignmentExpression_2 1940 class Getter_NodeReplacerTest_test_assignmentExpression_2
1941 implements NodeReplacerTest_Getter { 1941 implements NodeReplacerTest_Getter {
1942 @override 1942 @override
1943 Expression get(AssignmentExpression node) => node.leftHandSide; 1943 Expression get(AssignmentExpression node) => node.leftHandSide;
1944 } 1944 }
1945 1945
1946 class Getter_NodeReplacerTest_test_awaitExpression
1947 implements NodeReplacerTest_Getter {
1948 @override
1949 Expression get(AwaitExpression node) => node.expression;
1950 }
1951
1946 class Getter_NodeReplacerTest_test_binaryExpression 1952 class Getter_NodeReplacerTest_test_binaryExpression
1947 implements NodeReplacerTest_Getter { 1953 implements NodeReplacerTest_Getter {
1948 @override 1954 @override
1949 Expression get(BinaryExpression node) => node.leftOperand; 1955 Expression get(BinaryExpression node) => node.leftOperand;
1950 } 1956 }
1951 1957
1952 class Getter_NodeReplacerTest_test_binaryExpression_2 1958 class Getter_NodeReplacerTest_test_binaryExpression_2
1953 implements NodeReplacerTest_Getter { 1959 implements NodeReplacerTest_Getter {
1954 @override 1960 @override
1955 Expression get(BinaryExpression node) => node.rightOperand; 1961 Expression get(BinaryExpression node) => node.rightOperand;
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 3283
3278 void test_assignmentExpression() { 3284 void test_assignmentExpression() {
3279 AssignmentExpression node = AstFactory.assignmentExpression( 3285 AssignmentExpression node = AstFactory.assignmentExpression(
3280 AstFactory.identifier3("l"), TokenType.EQ, AstFactory.identifier3("r")); 3286 AstFactory.identifier3("l"), TokenType.EQ, AstFactory.identifier3("r"));
3281 _assertReplace( 3287 _assertReplace(
3282 node, new Getter_NodeReplacerTest_test_assignmentExpression_2()); 3288 node, new Getter_NodeReplacerTest_test_assignmentExpression_2());
3283 _assertReplace( 3289 _assertReplace(
3284 node, new Getter_NodeReplacerTest_test_assignmentExpression()); 3290 node, new Getter_NodeReplacerTest_test_assignmentExpression());
3285 } 3291 }
3286 3292
3293 void test_awaitExpression() {
3294 var node = AstFactory.awaitExpression(AstFactory.identifier3("A"));
3295 _assertReplace(node, new Getter_NodeReplacerTest_test_awaitExpression());
3296 }
3297
3287 void test_binaryExpression() { 3298 void test_binaryExpression() {
3288 BinaryExpression node = AstFactory.binaryExpression( 3299 BinaryExpression node = AstFactory.binaryExpression(
3289 AstFactory.identifier3("l"), TokenType.PLUS, 3300 AstFactory.identifier3("l"), TokenType.PLUS,
3290 AstFactory.identifier3("r")); 3301 AstFactory.identifier3("r"));
3291 _assertReplace(node, new Getter_NodeReplacerTest_test_binaryExpression()); 3302 _assertReplace(node, new Getter_NodeReplacerTest_test_binaryExpression());
3292 _assertReplace(node, new Getter_NodeReplacerTest_test_binaryExpression_2()); 3303 _assertReplace(node, new Getter_NodeReplacerTest_test_binaryExpression_2());
3293 } 3304 }
3294 3305
3295 void test_block() { 3306 void test_block() {
3296 Block node = AstFactory.block([AstFactory.emptyStatement()]); 3307 Block node = AstFactory.block([AstFactory.emptyStatement()]);
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
4576 } 4587 }
4577 4588
4578 void test_get_added() { 4589 void test_get_added() {
4579 TokenMap tokenMap = new TokenMap(); 4590 TokenMap tokenMap = new TokenMap();
4580 Token key = TokenFactory.tokenFromType(TokenType.AT); 4591 Token key = TokenFactory.tokenFromType(TokenType.AT);
4581 Token value = TokenFactory.tokenFromType(TokenType.AT); 4592 Token value = TokenFactory.tokenFromType(TokenType.AT);
4582 tokenMap.put(key, value); 4593 tokenMap.put(key, value);
4583 expect(tokenMap.get(key), same(value)); 4594 expect(tokenMap.get(key), same(value));
4584 } 4595 }
4585 } 4596 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698