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

Unified Diff: pkg/analysis_server/test/edit/format_test.dart

Issue 1099633004: Fix error handling for formatting and update the spec (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
Index: pkg/analysis_server/test/edit/format_test.dart
diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
index 1bd9f709d35503b5522f35cddb4eca40e486dabd..b045e1a19d339082db3e4aa66ed01480a957bd37 100644
--- a/pkg/analysis_server/test/edit/format_test.dart
+++ b/pkg/analysis_server/test/edit/format_test.dart
@@ -13,6 +13,7 @@ import 'package:analyzer/src/plugin/plugin_impl.dart';
import 'package:unittest/unittest.dart' hide ERROR;
import '../analysis_abstract.dart';
+import '../mocks.dart';
import '../reflective_tests.dart';
main() {
@@ -87,6 +88,17 @@ main() {
});
}
+ Future test_withErrors() {
+ addTestFile('''
+main() { int x =
+''');
+ return waitForTasksFinished().then((_) {
+ Request request = new EditFormatParams(testFile, 0, 3).toRequest('0');
+ Response response = handler.handleRequest(request);
+ expect(response, isResponseFailure('0'));
+ });
+ }
+
EditFormatResult _formatAt(int selectionOffset, int selectionLength) {
Request request = new EditFormatParams(
testFile, selectionOffset, selectionLength).toRequest('0');

Powered by Google App Engine
This is Rietveld 408576698