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

Unified Diff: pkg/analysis_server/test/domain_analysis_test.dart

Issue 402493002: Remove 'errorCode' field from AnalysisError in the analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index b4b0442e015fee7e3f985198c2766d61c3380bf6..8b80cd7c3b8fea1acb844999e0fb7a635ff75cb1 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -27,7 +27,7 @@ AnalysisError jsonToAnalysisError(Map<String, Object> json) {
Location location = new Location(jsonLocation[FILE], _getSafeInt(jsonLocation,
OFFSET, -1), _getSafeInt(jsonLocation, LENGTH, -1), _getSafeInt(jsonLocation,
START_LINE, -1), _getSafeInt(jsonLocation, START_COLUMN, -1));
- return new AnalysisError(json[ERROR_CODE], json[SEVERITY], json[TYPE], location,
+ return new AnalysisError('unknown error code', json[SEVERITY], json[TYPE], location,
json['message'], json['correction']);
}
@@ -175,7 +175,7 @@ testNotificationErrors() {
helper = new AnalysisTestHelper();
});
- test('ParserErrorCode', () {
+ test('ParserError', () {
helper.createSingleFileProject('library lib');
return helper.waitForOperationsFinished().then((_) {
List<AnalysisError> errors = helper.getTestErrors();
@@ -184,20 +184,20 @@ testNotificationErrors() {
expect(error.location.file, '/project/bin/test.dart');
expect(error.location.offset, isPositive);
expect(error.location.length, isNonNegative);
- expect(error.errorCode, 'ParserErrorCode.EXPECTED_TOKEN');
expect(error.severity, 'ERROR');
expect(error.type, 'SYNTACTIC_ERROR');
expect(error.message, isNotNull);
});
});
- test('StaticWarningCode', () {
+ test('StaticWarning', () {
helper.createSingleFileProject(['main() {', ' print(unknown);', '}']);
return helper.waitForOperationsFinished().then((_) {
List<AnalysisError> errors = helper.getTestErrors();
expect(errors, hasLength(1));
AnalysisError error = errors[0];
- expect(error.errorCode, 'StaticWarningCode.UNDEFINED_IDENTIFIER');
+ expect(error.severity, 'WARNING');
+ expect(error.type, 'STATIC_WARNING');
});
});
}
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.dart ('k') | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698