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

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

Issue 759183002: Fix incremental parsing of import combinators. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
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 7ee8a2c21c7a2b2fa633f0944227f5601461722b..1dc7170cf7a1f27ba5683bb228cfa014d5fd2aab 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -2604,6 +2604,10 @@ class IncrementalParserTest extends EngineTestCase {
_assertParse('class C { void f(', '', 'arg', ') {} }');
}
+ void test_insert_identifier_inCombinator() {
+ _assertParse("import 'foo.dart' show x", "", ", y", ";");
+ }
+
void test_insert_insideClassBody() {
// "class C {C(); }"
// "class C { C(); }"
@@ -6503,6 +6507,22 @@ class SimpleParserTest extends ParserTestCase {
expect(classTypeAlias.semicolon, isNotNull);
}
+ void test_parseCombinator_hide() {
+ HideCombinator combinator =
+ ParserTestCase.parse4('parseCombinator', 'hide a;');
+ expect(combinator, new isInstanceOf<HideCombinator>());
+ expect(combinator.keyword, isNotNull);
+ expect(combinator.hiddenNames, hasLength(1));
+ }
+
+ void test_parseCombinator_show() {
+ ShowCombinator combinator =
+ ParserTestCase.parse4('parseCombinator', 'show a;');
+ expect(combinator, new isInstanceOf<ShowCombinator>());
+ expect(combinator.keyword, isNotNull);
+ expect(combinator.shownNames, hasLength(1));
+ }
+
void test_parseCombinators_h() {
List<Combinator> combinators =
ParserTestCase.parse4("parseCombinators", "hide a;");
« pkg/analyzer/lib/src/generated/parser.dart ('K') | « 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