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

Unified Diff: pkg/front_end/test/scanner_fasta_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_fasta_test.dart
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index a588b63b78d80409a0be8efba4c9b642f35ba35e..9404a293ef8fdd24a9dbc46fc056dfc4a7871469 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -28,31 +28,15 @@ class ScannerTest_Fasta extends ScannerTestBase {
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(paulberry): once lazyAssignmentOperators are fully supported by
- // Dart, remove this flag.
- var scanner = new fasta.StringScanner(source, includeComments: true);
- scanner.scanGenericMethodComments = genericMethodComments;
+ var scanner = new fasta.StringScanner(source,
+ includeComments: true,
+ scanGenericMethodComments: genericMethodComments,
+ scanLazyAssignmentOperators: lazyAssignmentOperators);
var token = scanner.tokenize();
return new ToAnalyzerTokenStreamConverter_WithListener(listener)
.convertTokens(token);
}
- @override
- @failingTest
- void test_ampersand_ampersand_eq() {
- // TODO(paulberry,ahe): Fasta doesn't support `&&=` yet
- super.test_ampersand_ampersand_eq();
- }
-
- @override
- @failingTest
- void test_bar_bar_eq() {
- // TODO(paulberry,ahe): Fasta doesn't support `||=` yet
- super.test_bar_bar_eq();
- }
-
void test_comments() {
const source = '''
/// Doc comment before class

Powered by Google App Engine
This is Rietveld 408576698