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

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

Issue 755373003: Try to resolve incrementally whole functions, constructors or methods. (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
« 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 8b8062a27514f362d92158c03d3f8560e11f1278..15086b85d56de937fe98032836334a2af05b1e63 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -2050,6 +2050,83 @@ main() {
}
}
+ void test_true_wholeConstructor() {
+ _resolveUnit(r'''
+class A {
+ A(int a) {
+ print(a);
+ }
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ A(int b) {
+ print(b);
+ }
+}
+''');
+ }
+
+ void test_true_wholeConstructor_addInitializer() {
+ _resolveUnit(r'''
+class A {
+ int field;
+ A();
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ int field;
+ A() : field = 5;
+}
+''');
+ }
+
+ void test_true_wholeFunction() {
+ _resolveUnit(r'''
+foo() {}
+main(int a) {
+ print(a);
+}
+''');
+ _updateAndValidate(r'''
+foo() {}
+main(int b) {
+ print(b);
+}
+''');
+ }
+
+ void test_true_wholeFunction_firstTokenInUnit() {
+ _resolveUnit(r'''
+main(int a) {
+ print(a);
+}
+''');
+ _updateAndValidate(r'''
+main(int b) {
+ print(b);
+}
+''');
+ }
+
+ void test_true_wholeMethod() {
+ _resolveUnit(r'''
+class A {
+ main(int a) {
+ print(a);
+ }
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ main(int b) {
+ print(b);
+ }
+}
+''');
+ }
+
void test_updateErrors_addNew_hints() {
_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