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

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

Issue 2895803002: add fasta.scanner support for lazy assignment operators (Closed)
Patch Set: address comments 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/test/scanner_replacement_test.dart
diff --git a/pkg/front_end/test/scanner_replacement_test.dart b/pkg/front_end/test/scanner_replacement_test.dart
index e1d5908706d108fdb225550bc576bb0f97d035c1..772ad34247b4c6f1ee38c58d5aa0fc1cca03bbfa 100644
--- a/pkg/front_end/test/scanner_replacement_test.dart
+++ b/pkg/front_end/test/scanner_replacement_test.dart
@@ -35,12 +35,10 @@ class ScannerTest_Replacement extends ScannerTest {
analyzer.Token scanWithListener(String source, ErrorListener listener,
{bool genericMethodComments: false,
bool lazyAssignmentOperators: false}) {
- // Note: Fasta always supports lazy assignment operators (`&&=` and `||=`),
- // so we can ignore the `lazyAssignmentOperators` flag.
- // TODO(danrubel): once lazyAssignmentOperators are fully supported by
- // Dart, remove this flag.
fasta.ScannerResult result = fasta.scanString(source,
- includeComments: true, scanGenericMethodComments: genericMethodComments,
+ includeComments: true,
+ scanGenericMethodComments: genericMethodComments,
+ scanLazyAssignmentOperators: lazyAssignmentOperators,
recover: ((List<int> bytes, fasta.Token tokens, List<int> lineStarts) {
// perform recovery as a separate step
// so that the token stream can be validated before and after recovery
@@ -57,22 +55,6 @@ class ScannerTest_Replacement extends ScannerTest {
return extractErrors(tokens, listener);
}
- @override
- @failingTest
- void test_ampersand_ampersand_eq() {
- // TODO(paulberry,ahe): Fasta scanner doesn't support lazy assignment
- // operators.
- super.test_ampersand_ampersand_eq();
- }
-
- @override
- @failingTest
- void test_bar_bar_eq() {
- // TODO(paulberry,ahe): Fasta scanner doesn't support lazy assignment
- // operators.
- super.test_bar_bar_eq();
- }
-
void _assertOpenClosePair(String source) {
fasta.BeginGroupToken open = _scan(source);
fasta.Token close = open.next;

Powered by Google App Engine
This is Rietveld 408576698