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

Side by Side Diff: pkg/front_end/test/scanner_test.dart

Issue 2689733003: Add the ability to convert an analyzer token stream to a Fasta one. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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:front_end/src/base/errors.dart'; 5 import 'package:front_end/src/base/errors.dart';
6 import 'package:front_end/src/base/jenkins_smi_hash.dart'; 6 import 'package:front_end/src/base/jenkins_smi_hash.dart';
7 import 'package:front_end/src/scanner/errors.dart'; 7 import 'package:front_end/src/scanner/errors.dart';
8 import 'package:front_end/src/scanner/reader.dart'; 8 import 'package:front_end/src/scanner/reader.dart';
9 import 'package:front_end/src/scanner/scanner.dart'; 9 import 'package:front_end/src/scanner/scanner.dart';
10 import 'package:front_end/src/scanner/token.dart'; 10 import 'package:front_end/src/scanner/token.dart';
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 void test_eq() { 361 void test_eq() {
362 _assertToken(TokenType.EQ, "="); 362 _assertToken(TokenType.EQ, "=");
363 } 363 }
364 364
365 void test_eq_eq() { 365 void test_eq_eq() {
366 _assertToken(TokenType.EQ_EQ, "=="); 366 _assertToken(TokenType.EQ_EQ, "==");
367 } 367 }
368 368
369 void test_function() {
370 _assertToken(TokenType.FUNCTION, "=>");
371 }
372
369 void test_gt() { 373 void test_gt() {
370 _assertToken(TokenType.GT, ">"); 374 _assertToken(TokenType.GT, ">");
371 } 375 }
372 376
373 void test_gt_eq() { 377 void test_gt_eq() {
374 _assertToken(TokenType.GT_EQ, ">="); 378 _assertToken(TokenType.GT_EQ, ">=");
375 } 379 }
376 380
377 void test_gt_gt() { 381 void test_gt_gt() {
378 _assertToken(TokenType.GT_GT, ">>"); 382 _assertToken(TokenType.GT_GT, ">>");
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 _TestScanner(CharacterReader reader, [this.listener]) : super(reader); 1411 _TestScanner(CharacterReader reader, [this.listener]) : super(reader);
1408 1412
1409 @override 1413 @override
1410 void reportError( 1414 void reportError(
1411 ScannerErrorCode errorCode, int offset, List<Object> arguments) { 1415 ScannerErrorCode errorCode, int offset, List<Object> arguments) {
1412 if (listener != null) { 1416 if (listener != null) {
1413 listener.errors.add(new TestError(offset, errorCode, arguments)); 1417 listener.errors.add(new TestError(offset, errorCode, arguments));
1414 } 1418 }
1415 } 1419 }
1416 } 1420 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698