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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 739723003: Incremental parser fix: handle insertion of "final" before field decl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix bogus test Created 6 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 2630304d425a189ae078a3c094b7d9b788011d50..5cf4b622b9c196b4a7832cd8641a75be1d1f5743 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -2598,6 +2598,10 @@ class IncrementalParserTest extends EngineTestCase {
_assertParse("class A {}", "", " class B {}", "");
}
+ void test_insert_final_before_field_declaration() {
+ _assertParse('class C { ', '', 'final ', 'int x; }');
+ }
+
void test_insert_insideClassBody() {
// "class C {C(); }"
// "class C { C(); }"
@@ -2702,6 +2706,12 @@ class IncrementalParserTest extends EngineTestCase {
_assertParse("f() => a", "", " ", " + b;");
}
+ void test_replace_field_type_with_void() {
+ // Note: this produces an error, but we still need the parser to produce a
+ // consistent parse tree for it.
+ _assertParse('class C { ', 'int', 'void', ' x; }');
+ }
+
void test_replace_identifier_beginning() {
// "f() => bell + b;"
// "f() => fell + b;"
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698