OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 import "package:expect/expect.dart"; |
5 import 'parser_helper.dart'; | 6 import 'parser_helper.dart'; |
6 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; | 7 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; |
7 | 8 |
8 void testNode(Node node, String expected, String text, [bool hard = true]) { | 9 void testNode(Node node, String expected, String text, [bool hard = true]) { |
9 var debug = 'text=$text,expected=$expected,node:${node}'; | 10 var debug = 'text=$text,expected=$expected,node:${node}'; |
10 Expect.isNotNull(node, debug); | 11 Expect.isNotNull(node, debug); |
11 | 12 |
12 Token beginToken = node.getBeginToken(); | 13 Token beginToken = node.getBeginToken(); |
13 Expect.isNotNull(beginToken, debug); | 14 Expect.isNotNull(beginToken, debug); |
14 Token endToken = node.getEndToken(); | 15 Token endToken = node.getEndToken(); |
(...skipping 148 matching lines...) Loading... |
163 testNode(sendSet.assignmentOperator, "++", text); | 164 testNode(sendSet.assignmentOperator, "++", text); |
164 testNode(sendSet.arguments.head, "b", text); | 165 testNode(sendSet.arguments.head, "b", text); |
165 } | 166 } |
166 | 167 |
167 void main() { | 168 void main() { |
168 testUnaryExpression(); | 169 testUnaryExpression(); |
169 testAssignment(); | 170 testAssignment(); |
170 testIndex(); | 171 testIndex(); |
171 testPostfix(); | 172 testPostfix(); |
172 } | 173 } |
OLD | NEW |