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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1086273002: Fix for linked position offsets when insert directly before. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 0c481bf97470ee2234475fec5056fca0c911d1df..c1a9993ba8252d3a9b6784c07df2ed3705d91e80 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -1293,6 +1293,23 @@ main() {
}
f(String p) {}
''');
+ _assertLinkedGroup(change.linkedEditGroups[0], ['String test;']);
+ _assertLinkedGroup(change.linkedEditGroups[1], ['test;', 'test);']);
+ }
+
+ void test_createLocalVariable_read_typeInvocationTarget() {
+ resolveTestUnit('''
+main() {
+ test.add('hello');
+}
+''');
+ assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
+main() {
+ var test;
+ test.add('hello');
+}
+''');
+ _assertLinkedGroup(change.linkedEditGroups[0], ['test;', 'test.add(']);
}
void test_createLocalVariable_write_assignment() {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698