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

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

Issue 2214943002: Fix incremental resolution when inserting/removing empty lines before comments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.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/incremental_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index fa0ad4931470d9b41c0405a0f25b1b7c7a061ec4..3a06df4942d6ceda339523e3057f305de85c805a 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -1348,6 +1348,24 @@ class A {
''');
}
+ void test_true_emptyLine_betweenClassMembers_insert_beforeComment() {
+ _resolveUnit(r'''
+class A {
+ a() {}
+ /// BBB
+ b() {}
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ a() {}
+
+ /// BBB
+ b() {}
+}
+''');
+ }
+
void test_true_emptyLine_betweenClassMembers_remove() {
_resolveUnit(r'''
class A {
@@ -1364,7 +1382,25 @@ class A {
''');
}
- void test_true_emptyLine_betweenCompilationUnitMembers_insert() {
+ void test_true_emptyLine_betweenClassMembers_remove_beforeComment() {
+ _resolveUnit(r'''
+class A {
+ a() {}
+
+ /// BBB
+ b() {}
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ a() {}
+ /// BBB
+ b() {}
+}
+''');
+ }
+
+ void test_true_emptyLine_betweenUnitMembers_insert() {
_resolveUnit(r'''
a() {}
b() {}
@@ -1376,7 +1412,23 @@ b() {}
''');
}
- void test_true_emptyLine_betweenCompilationUnitMembers_remove() {
+ void test_true_emptyLine_betweenUnitMembers_insert_beforeComment() {
+ _resolveUnit(r'''
+a() {}
+
+// BBB
+b() {}
+''');
+ _updateAndValidate(r'''
+a() {}
+
+
+// BBB
+b() {}
+''');
+ }
+
+ void test_true_emptyLine_betweenUnitMembers_remove() {
_resolveUnit(r'''
a() {
print(1)
@@ -1398,6 +1450,20 @@ foo(String p) {}
''');
}
+ void test_true_emptyLine_betweenUnitMembers_remove_beforeComment() {
+ _resolveUnit(r'''
+a() {}
+
+// BBB
+b() {}
+''');
+ _updateAndValidate(r'''
+a() {}
+// BBB
+b() {}
+''');
+ }
+
void test_true_todoHint() {
_resolveUnit(r'''
main() {
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698