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

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

Issue 2900303003: delete obsolete scanner roundtrip test (Closed)
Patch Set: Created 3 years, 7 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/front_end/test/scanner_roundtrip_test.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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/fasta/scanner/string_scanner.dart'; 5 import 'package:front_end/src/fasta/scanner/string_scanner.dart';
6 import 'package:front_end/src/fasta/scanner/token.dart' as fasta; 6 import 'package:front_end/src/fasta/scanner/token.dart' as fasta;
7 import 'package:front_end/src/scanner/token.dart'; 7 import 'package:front_end/src/scanner/token.dart';
8 import 'package:front_end/src/scanner/errors.dart' as analyzer;
8 import 'package:front_end/src/scanner/reader.dart' as analyzer; 9 import 'package:front_end/src/scanner/reader.dart' as analyzer;
10 import 'package:front_end/src/scanner/scanner.dart' as analyzer;
9 import 'package:test/test.dart'; 11 import 'package:test/test.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
11 import 'scanner_roundtrip_test.dart' show TestScanner;
12 13
13 main() { 14 main() {
14 defineReflectiveSuite(() { 15 defineReflectiveSuite(() {
15 defineReflectiveTests(TokenTest); 16 defineReflectiveTests(TokenTest);
16 }); 17 });
17 } 18 }
18 19
19 /// Assert that fasta PrecedenceInfo implements analyzer TokenType. 20 /// Assert that fasta PrecedenceInfo implements analyzer TokenType.
20 @reflectiveTest 21 @reflectiveTest
21 class TokenTest { 22 class TokenTest {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // General tokens 202 // General tokens
202 token = token.next; 203 token = token.next;
203 expect(token.lexeme, '&'); 204 expect(token.lexeme, '&');
204 expect(token.value(), '&'); 205 expect(token.value(), '&');
205 // String tokens 206 // String tokens
206 token = token.next; 207 token = token.next;
207 expect(token.lexeme, '"home"'); 208 expect(token.lexeme, '"home"');
208 expect(token.value(), '"home"'); 209 expect(token.value(), '"home"');
209 } 210 }
210 } 211 }
212
213 class TestScanner extends analyzer.Scanner {
214 TestScanner(analyzer.CharacterReader reader) : super.create(reader);
215
216 @override
217 void reportError(
218 analyzer.ScannerErrorCode errorCode, int offset, List<Object> arguments) {
219 fail('Unexpected error $errorCode while scanning offset $offset\n'
220 ' arguments: $arguments');
221 }
222 }
OLDNEW
« no previous file with comments | « pkg/front_end/test/scanner_roundtrip_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698