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

Unified Diff: pkg/analysis_server/test/integration/analysis/update_content_list_test.dart

Issue 621383002: Change integration test send...() methods to use structured objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reintroduce type checking of server responses 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/integration/analysis/update_content_list_test.dart
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
index 792fa13aa8da3de969e3accad38c8bec272d01df..a4fcd382516204caec7cef63b03752f51d2b32bd 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
@@ -4,9 +4,10 @@
library test.integration.analysis.update.content.list;
-import '../../reflective_tests.dart';
+import 'package:analysis_server/src/protocol.dart';
import 'package:unittest/unittest.dart';
+import '../../reflective_tests.dart';
import '../integration_tests.dart';
@ReflectiveTestCase()
@@ -24,10 +25,7 @@ main() {
standardAnalysisSetup();
// Override file contents with badText.
sendAnalysisUpdateContent({
- pathname: {
- 'type': 'add',
- 'content': badText
- }
+ pathname: new AddContentOverlay(badText)
});
return analysisFinished.then((_) {
// The overridden contents (badText) are missing quotation marks.
@@ -37,16 +35,10 @@ main() {
// order in which they appear in the file. If these edits are applied in
// the wrong order, some of the quotation marks will be in the wrong
// places, and there will still be errors.
- List edits = '"'.allMatches(goodText).map((Match match) => {
- 'offset': match.start,
- 'length': 0,
- 'replacement': '"'
- }).toList();
+ List<SourceEdit> edits = '"'.allMatches(
+ goodText).map((Match match) => new SourceEdit(match.start, 0, '"')).toList();
sendAnalysisUpdateContent({
- pathname: {
- 'type': 'change',
- 'edits': edits
- }
+ pathname: new ChangeContentOverlay(edits)
});
return analysisFinished;
}).then((_) {

Powered by Google App Engine
This is Rietveld 408576698