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

Unified Diff: pkg/front_end/test/scanner_roundtrip_test.dart

Issue 2693403002: Change toAnalyzerTokenStream into a class. (Closed)
Patch Set: Rework 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/test/scanner_roundtrip_test.dart
diff --git a/pkg/front_end/test/scanner_roundtrip_test.dart b/pkg/front_end/test/scanner_roundtrip_test.dart
index a327451592a5dd7bf25419ed71c25ea9b559b883..398376b8efc7b8c0d34c3955118cebf7c295f08e 100644
--- a/pkg/front_end/test/scanner_roundtrip_test.dart
+++ b/pkg/front_end/test/scanner_roundtrip_test.dart
@@ -3,11 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/fasta/analyzer/token_utils.dart';
-import 'package:front_end/src/scanner/errors.dart';
import 'package:front_end/src/scanner/token.dart';
-import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'scanner_fasta_test.dart';
import 'scanner_test.dart';
main() {
@@ -32,13 +31,11 @@ class ScannerTest_RoundTrip extends ScannerTest {
genericMethodComments: genericMethodComments,
lazyAssignmentOperators: lazyAssignmentOperators);
var fastaToken = fromAnalyzerTokenStream(analyzerToken);
- return toAnalyzerTokenStream(fastaToken,
- (ScannerErrorCode errorCode, int offset, List<Object> arguments) {
- // Since [scanWithListener] reports errors to the listener, we don't
- // expect any error tokens in the Fasta token stream; so this callback
- // should never be called.
- fail('Unexpected error reported: $errorCode, $offset, $arguments');
- });
+ // Since [scanWithListener] reports errors to the listener, we don't
+ // expect any error tokens in the Fasta token stream, so we convert using
+ // ToAnalyzerTokenStreamConverter_NoErrors.
+ return new ToAnalyzerTokenStreamConverter_NoErrors()
+ .convertTokens(fastaToken);
}
@override

Powered by Google App Engine
This is Rietveld 408576698