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

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

Issue 751343002: Fixes for identifying changed token ranges and updating them. (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 4d263f4df8a287a95c02dfd04a1eafb3232527d8..3bf42533e73cbc5b47e1583941881e8e7b8bd5ba 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -1870,43 +1870,51 @@ main() {
''');
}
- void test_twice() {
- _resolveUnit(r'''
-main() {
- print(1);
-}''');
- _updateAndValidate(r'''
-main() {
- print(12);
-}''', false);
- _updateAndValidate(r'''
-main() {
- print(1);
-}''', false);
- }
-
- void test_twice2() {
+ void test_multiple_emptyLine() {
_resolveUnit(r'''
class A {
m() {
- int vvvvvvvv = 42;
- print(vvvvvvvv);
+ return true;
}
}''');
- _updateAndValidate(r'''
+ for (int i = 0; i < 6; i++) {
+ if (i.isEven) {
+ _updateAndValidate(r'''
class A {
m() {
- int vvvvvvvv2 = 42;
- print(vvvvvvvv2);
+ return true;
+
}
}''', false);
- _updateAndValidate(r'''
+ } else {
+ _updateAndValidate(r'''
class A {
m() {
- int vvvvvvvv = 42;
- print(vvvvvvvv);
+ return true;
}
}''', false);
+ }
+ }
+ }
+
+ void test_multiple_expression() {
+ _resolveUnit(r'''
+main() {
+ print(1);
+}''');
+ for (int i = 0; i < 6; i++) {
+ if (i.isEven) {
+ _updateAndValidate(r'''
+main() {
+ print(12);
+}''', false);
+ } else {
+ _updateAndValidate(r'''
+main() {
+ print(1);
+}''', false);
+ }
+ }
}
void test_updateErrors_addNew_hints() {
@@ -1914,15 +1922,11 @@ class A {
main() {
int v = 0;
print(v);
- print(42);
}
''');
- // TODO(scheglov) "print(42)" is here because it seems we have bug with
- // incremental analysis and the end of a function body.
_updateAndValidate(r'''
main() {
int v = 0;
- print(42);
}
''');
}
« 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