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

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

Issue 497393002: Make more use of generated code in analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
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 ef2b3364a372a8c8d7125ca945cb3bba1ced307e..d3dbc967eb53553424900a211ec1ec1cf3a78cb2 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -4,9 +4,9 @@
library test.services.correction.fix;
-import 'package:analysis_server/src/protocol2.dart' show SourceEdit,
- SourceFileEdit, Position;
-import 'package:analysis_server/src/services/correction/change.dart';
+import 'package:analysis_server/src/protocol2.dart' show LinkedEditGroup,
+ LinkedEditSuggestion, LinkedEditSuggestionKind, Position, SourceChange,
+ SourceEdit, SourceFileEdit;
import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:analysis_server/src/services/index/index.dart';
import 'package:analysis_server/src/services/index/local_memory_index.dart';
@@ -33,7 +33,7 @@ class FixProcessorTest extends AbstractSingleUnitTest {
SearchEngineImpl searchEngine;
Fix fix;
- Change change;
+ SourceChange change;
String resultCode;
void assertHasFix(FixKind kind, String expected) {
@@ -41,9 +41,9 @@ class FixProcessorTest extends AbstractSingleUnitTest {
fix = _assertHasFix(kind, error);
change = fix.change;
// apply to "file"
- List<SourceFileEdit> fileEdits = change.fileEdits;
+ List<SourceFileEdit> fileEdits = change.edits;
expect(fileEdits, hasLength(1));
- resultCode = SourceEdit.applySequence(testCode, change.fileEdits[0].edits);
+ resultCode = SourceEdit.applySequence(testCode, change.edits[0].edits);
// verify
expect(resultCode, expected);
}
@@ -93,7 +93,7 @@ bool test() {
List<LinkedEditSuggestion> expectedSuggestions(LinkedEditSuggestionKind kind,
List<String> values) {
return values.map((value) {
- return new LinkedEditSuggestion(kind, value);
+ return new LinkedEditSuggestion(value, kind);
}).toList();
}

Powered by Google App Engine
This is Rietveld 408576698