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

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

Issue 2498873004: Issue 27689. Fix incremental resolution with body modifiers changes. (Closed)
Patch Set: Created 4 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/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 eba34502857c4a23580fca5df657ca877a28f958..5bfd2a97b0aa4c1a0277cc713fa197e28e9f55ea 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -1011,6 +1011,55 @@ class A {
expectedSuccess: false);
}
+ void test_false_inBody_addAsync() {
+ _resolveUnit(r'''
+class C {
+ test() {}
+}
+''');
+ _updateAndValidate(
+ r'''
+class C {
+ test() async {}
+}
+''',
+ expectedSuccess: false);
+ }
+
+ void test_false_inBody_async_addStar() {
+ _resolveUnit(r'''
+import 'dart:async';
+class C {
+ Stream test() async {}
+}
+''');
+ _updateAndValidate(
+ r'''
+import 'dart:async';
+class C {
+ Stream test() async* {}
+}
+''',
+ expectedSuccess: false);
+ }
+
+ void test_false_inBody_async_removeStar() {
+ _resolveUnit(r'''
+import 'dart:async';
+class C {
+ Stream test() async* {}
+}
+''');
+ _updateAndValidate(
+ r'''
+import 'dart:async';
+class C {
+ Stream test() async {}
+}
+''',
+ expectedSuccess: false);
+ }
+
void test_false_inBody_functionExpression() {
_resolveUnit(r'''
class C extends D {
@@ -1034,6 +1083,36 @@ class D {}
expectedSuccess: false);
}
+ void test_false_inBody_removeAsync() {
+ _resolveUnit(r'''
+class C {
+ test() async {}
+}
+''');
+ _updateAndValidate(
+ r'''
+class C {
+ test() {}
+}
+''',
+ expectedSuccess: false);
+ }
+
+ void test_false_inBody_sync_addStar() {
+ _resolveUnit(r'''
+class C {
+ test() {}
+}
+''');
+ _updateAndValidate(
+ r'''
+class C {
+ test() sync* {}
+}
+''',
+ expectedSuccess: false);
+ }
+
void test_false_topLevelFunction_name() {
_resolveUnit(r'''
a() {}

Powered by Google App Engine
This is Rietveld 408576698