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

Side by Side Diff: pkg/analysis_server/test/analysis/get_errors_test.dart

Issue 531153002: Clarify type names in analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.analysis.get_errors; 5 library test.analysis.get_errors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/domain_analysis.dart'; 9 import 'package:analysis_server/src/domain_analysis.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 test_hasErrors() { 67 test_hasErrors() {
68 addTestFile(''' 68 addTestFile('''
69 main() { 69 main() {
70 print(42) 70 print(42)
71 } 71 }
72 '''); 72 ''');
73 return _getErrors(testFile).then((List<AnalysisError> errors) { 73 return _getErrors(testFile).then((List<AnalysisError> errors) {
74 expect(errors, hasLength(1)); 74 expect(errors, hasLength(1));
75 { 75 {
76 AnalysisError error = errors[0]; 76 AnalysisError error = errors[0];
77 expect(error.severity, ErrorSeverity.ERROR); 77 expect(error.severity, AnalysisErrorSeverity.ERROR);
78 expect(error.type, ErrorType.SYNTACTIC_ERROR); 78 expect(error.type, AnalysisErrorType.SYNTACTIC_ERROR);
79 expect(error.location.file, testFile); 79 expect(error.location.file, testFile);
80 expect(error.location.startLine, 2); 80 expect(error.location.startLine, 2);
81 } 81 }
82 }); 82 });
83 } 83 }
84 84
85 test_noErrors() { 85 test_noErrors() {
86 addTestFile(''' 86 addTestFile('''
87 main() { 87 main() {
88 print(42); 88 print(42);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return new AnalysisGetErrorsParams(testFile).toRequest(requestId); 121 return new AnalysisGetErrorsParams(testFile).toRequest(requestId);
122 } 122 }
123 123
124 Future<List<AnalysisError>> _getErrors(String file) { 124 Future<List<AnalysisError>> _getErrors(String file) {
125 Request request = _createGetErrorsRequest(); 125 Request request = _createGetErrorsRequest();
126 return serverChannel.sendRequest(request).then((Response response) { 126 return serverChannel.sendRequest(request).then((Response response) {
127 return new AnalysisGetErrorsResult.fromResponse(response).errors; 127 return new AnalysisGetErrorsResult.fromResponse(response).errors;
128 }); 128 });
129 } 129 }
130 } 130 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/test/analysis/notification_errors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698