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

Side by Side Diff: tests/compiler/dart2js/parser_test.dart

Issue 206193002: Remove cancel and make crash exit with code 253. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | 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) 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 "package:expect/expect.dart";
6 import 'parser_helper.dart'; 6 import 'parser_helper.dart';
7 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; 7 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';
8 8
9 void testStatement(String statement) { 9 void testStatement(String statement) {
10 Node node = parseStatement(statement); 10 Node node = parseStatement(statement);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 Expect.stringEquals('operator', name.receiver.source); 262 Expect.stringEquals('operator', name.receiver.source);
263 Expect.stringEquals('-', name.selector.source); 263 Expect.stringEquals('-', name.selector.source);
264 Expect.isTrue(function.parameters.isEmpty); 264 Expect.isTrue(function.parameters.isEmpty);
265 Expect.isNull(function.returnType); 265 Expect.isNull(function.returnType);
266 Expect.isNull(function.getOrSet); 266 Expect.isNull(function.getOrSet);
267 } 267 }
268 268
269 class Collector implements DiagnosticListener { 269 class Collector implements DiagnosticListener {
270 int token = -1; 270 int token = -1;
271 271
272 void cancel(String reason, {node, token, instruction, element}) { 272 void reportFatalError(Token token,
273 messageKind,
274 [Map arguments = const {}]) {
273 this.token = token.kind; 275 this.token = token.kind;
274 throw this; 276 throw this;
275 } 277 }
276 278
277 void log(message) { 279 void log(message) {
278 print(message); 280 print(message);
279 } 281 }
280 } 282 }
281 283
282 void testMissingCloseParen() { 284 void testMissingCloseParen() {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 testWhileStatement(); 331 testWhileStatement();
330 testConditionalExpression(); 332 testConditionalExpression();
331 testAssignment(); 333 testAssignment();
332 testIndex(); 334 testIndex();
333 testPostfix(); 335 testPostfix();
334 testOperatorParse(); 336 testOperatorParse();
335 testMissingCloseParen(); 337 testMissingCloseParen();
336 testMissingCloseBraceInClass(); 338 testMissingCloseBraceInClass();
337 testUnmatchedAngleBracket(); 339 testUnmatchedAngleBracket();
338 } 340 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698