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

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

Issue 628293004: Remove references to Engine classes from protocol.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/change_test.dart
diff --git a/pkg/analysis_server/test/services/correction/change_test.dart b/pkg/analysis_server/test/services/correction/change_test.dart
index a1461b056b6f498bb0da4d132b7bf30a7f133c30..840fafcb77731e1c3d611d2a852208d09919d3ea 100644
--- a/pkg/analysis_server/test/services/correction/change_test.dart
+++ b/pkg/analysis_server/test/services/correction/change_test.dart
@@ -5,11 +5,12 @@
library test.services.correction.change;
import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/protocol.dart';
-import '../../reflective_tests.dart';
+import 'package:analysis_server/src/protocol_server.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:unittest/unittest.dart';
+import '../../reflective_tests.dart';
+
main() {
groupSep = ' | ';
@@ -145,7 +146,17 @@ class EditTest {
void test_applySequence() {
SourceEdit edit1 = new SourceEdit(5, 2, 'abc');
SourceEdit edit2 = new SourceEdit(1, 0, '!');
- expect(SourceEdit.applySequence('0123456789', [edit1, edit2]), '0!1234abc789');
+ expect(
+ SourceEdit.applySequence('0123456789', [edit1, edit2]),
+ '0!1234abc789');
+ }
+
+ void test_editFromRange() {
+ SourceRange range = new SourceRange(1, 2);
+ SourceEdit edit = newSourceEdit_range(range, 'foo');
+ expect(edit.offset, 1);
+ expect(edit.length, 2);
+ expect(edit.replacement, 'foo');
}
void test_eqEq() {
@@ -164,17 +175,12 @@ class EditTest {
expect(edit.offset, 1);
expect(edit.length, 2);
expect(edit.replacement, 'foo');
- expect(
- edit.toJson(),
- {'offset': 1, 'length': 2, 'replacement': 'foo', 'id': 'my-id'});
- }
-
- void test_editFromRange() {
- SourceRange range = new SourceRange(1, 2);
- SourceEdit edit = new SourceEdit.range(range, 'foo');
- expect(edit.offset, 1);
- expect(edit.length, 2);
- expect(edit.replacement, 'foo');
+ expect(edit.toJson(), {
+ 'offset': 1,
+ 'length': 2,
+ 'replacement': 'foo',
+ 'id': 'my-id'
+ });
}
void test_toJson() {
SourceEdit edit = new SourceEdit(1, 2, 'foo');
@@ -255,8 +261,7 @@ class LinkedEditGroupTest {
group.addPosition(new Position('/b.dart', 10), 2);
expect(
group.toString(),
- '{"positions":['
- '{"file":"/a.dart","offset":1},'
+ '{"positions":[' '{"file":"/a.dart","offset":1},'
'{"file":"/b.dart","offset":10}],"length":2,"suggestions":[]}');
}
« no previous file with comments | « pkg/analysis_server/test/search/search_result_test.dart ('k') | pkg/analysis_server/test/services/correction/status_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698