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

Side by Side 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, 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 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 /** 9 /**
10 * Matchers for data types defined in the analysis server API 10 * Matchers for data types defined in the analysis server API
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 "TYPE_PARAMETER", 1074 "TYPE_PARAMETER",
1075 "UNIT_TEST_GROUP", 1075 "UNIT_TEST_GROUP",
1076 "UNIT_TEST_TEST", 1076 "UNIT_TEST_TEST",
1077 "UNKNOWN" 1077 "UNKNOWN"
1078 ]); 1078 ]);
1079 1079
1080 /** 1080 /**
1081 * Error 1081 * Error
1082 * 1082 *
1083 * { 1083 * {
1084 * "code": String 1084 * "code": RequestErrorCode
1085 * "message": String 1085 * "message": String
1086 * "data": optional object 1086 * "data": optional object
1087 * } 1087 * }
1088 */ 1088 */
1089 final Matcher isError = new LazyMatcher(() => new MatchesJsonObject( 1089 final Matcher isError = new LazyMatcher(() => new MatchesJsonObject(
1090 "Error", { 1090 "Error", {
1091 "code": isString, 1091 "code": isRequestErrorCode,
1092 "message": isString 1092 "message": isString
1093 }, optionalFields: { 1093 }, optionalFields: {
1094 "data": isObject 1094 "data": isObject
1095 })); 1095 }));
1096 1096
1097 /** 1097 /**
1098 * ErrorFixes 1098 * ErrorFixes
1099 * 1099 *
1100 * { 1100 * {
1101 * "error": AnalysisError 1101 * "error": AnalysisError
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 * { 1605 * {
1606 * "type": "remove" 1606 * "type": "remove"
1607 * } 1607 * }
1608 */ 1608 */
1609 final Matcher isRemoveContentOverlay = new LazyMatcher(() => new MatchesJsonObje ct( 1609 final Matcher isRemoveContentOverlay = new LazyMatcher(() => new MatchesJsonObje ct(
1610 "RemoveContentOverlay", { 1610 "RemoveContentOverlay", {
1611 "type": equals("remove") 1611 "type": equals("remove")
1612 })); 1612 }));
1613 1613
1614 /** 1614 /**
1615 * RequestErrorCode
1616 *
1617 * enum {
1618 * GET_ERRORS_ERROR
1619 * INVALID_PARAMETER
1620 * INVALID_REQUEST
1621 * SERVER_ALREADY_STARTED
1622 * UNANALYZED_PRIORITY_FILES
1623 * UNKNOWN_REQUEST
1624 * UNSUPPORTED_FEATURE
1625 * }
1626 */
1627 final Matcher isRequestErrorCode = new MatchesEnum("RequestErrorCode", [
1628 "GET_ERRORS_ERROR",
1629 "INVALID_PARAMETER",
1630 "INVALID_REQUEST",
1631 "SERVER_ALREADY_STARTED",
1632 "UNANALYZED_PRIORITY_FILES",
1633 "UNKNOWN_REQUEST",
1634 "UNSUPPORTED_FEATURE"
1635 ]);
1636
1637 /**
1615 * SearchId 1638 * SearchId
1616 * 1639 *
1617 * String 1640 * String
1618 */ 1641 */
1619 final Matcher isSearchId = isString; 1642 final Matcher isSearchId = isString;
1620 1643
1621 /** 1644 /**
1622 * SearchResult 1645 * SearchResult
1623 * 1646 *
1624 * { 1647 * {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 * 1916 *
1894 * { 1917 * {
1895 * "newName": String 1918 * "newName": String
1896 * } 1919 * }
1897 */ 1920 */
1898 final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject( 1921 final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject(
1899 "rename options", { 1922 "rename options", {
1900 "newName": isString 1923 "newName": isString
1901 })); 1924 }));
1902 1925
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698