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

Unified Diff: pkg/analysis_server/test/integration/protocol_matchers.dart

Issue 513853002: In the analysis server API, change RequestError.code to an enum. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/protocol_matchers.dart
diff --git a/pkg/analysis_server/test/integration/protocol_matchers.dart b/pkg/analysis_server/test/integration/protocol_matchers.dart
index e493623979b79071dc9fecdb1b342d8dd95be58b..2f10f09a3599be6063a51ac4eaf9b8da6ca16ce1 100644
--- a/pkg/analysis_server/test/integration/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/protocol_matchers.dart
@@ -1081,14 +1081,14 @@ final Matcher isElementKind = new MatchesEnum("ElementKind", [
* Error
*
* {
- * "code": String
+ * "code": RequestErrorCode
* "message": String
* "data": optional object
* }
*/
final Matcher isError = new LazyMatcher(() => new MatchesJsonObject(
"Error", {
- "code": isString,
+ "code": isRequestErrorCode,
"message": isString
}, optionalFields: {
"data": isObject
@@ -1612,6 +1612,29 @@ final Matcher isRemoveContentOverlay = new LazyMatcher(() => new MatchesJsonObje
}));
/**
+ * RequestErrorCode
+ *
+ * enum {
+ * GET_ERRORS_ERROR
+ * INVALID_PARAMETER
+ * INVALID_REQUEST
+ * SERVER_ALREADY_STARTED
+ * UNANALYZED_PRIORITY_FILES
+ * UNKNOWN_REQUEST
+ * UNSUPPORTED_FEATURE
+ * }
+ */
+final Matcher isRequestErrorCode = new MatchesEnum("RequestErrorCode", [
+ "GET_ERRORS_ERROR",
+ "INVALID_PARAMETER",
+ "INVALID_REQUEST",
+ "SERVER_ALREADY_STARTED",
+ "UNANALYZED_PRIORITY_FILES",
+ "UNKNOWN_REQUEST",
+ "UNSUPPORTED_FEATURE"
+]);
+
+/**
* SearchId
*
* String

Powered by Google App Engine
This is Rietveld 408576698