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

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

Issue 475143003: Fix code generated matchers to handle recursive objects. (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 f22237d6de884bad1fb019e23613a6b15a2938c1..1185021c26c45800ec287357762566e8657db1e9 100644
--- a/pkg/analysis_server/test/integration/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/protocol_matchers.dart
@@ -28,10 +28,10 @@ final Matcher isServerGetVersionParams = isNull;
* "version": String
* }
*/
-final Matcher isServerGetVersionResult = new MatchesJsonObject(
+final Matcher isServerGetVersionResult = new LazyMatcher(() => new MatchesJsonObject(
"server.getVersion result", {
"version": isString
- });
+ }));
/**
* server.shutdown params
@@ -50,10 +50,10 @@ final Matcher isServerShutdownResult = isNull;
* "subscriptions": List<ServerService>
* }
*/
-final Matcher isServerSetSubscriptionsParams = new MatchesJsonObject(
+final Matcher isServerSetSubscriptionsParams = new LazyMatcher(() => new MatchesJsonObject(
"server.setSubscriptions params", {
"subscriptions": isListOf(isServerService)
- });
+ }));
/**
* server.setSubscriptions result
@@ -74,12 +74,12 @@ final Matcher isServerConnectedParams = isNull;
* "stackTrace": String
* }
*/
-final Matcher isServerErrorParams = new MatchesJsonObject(
+final Matcher isServerErrorParams = new LazyMatcher(() => new MatchesJsonObject(
"server.error params", {
"fatal": isBool,
"message": isString,
"stackTrace": isString
- });
+ }));
/**
* server.status params
@@ -88,10 +88,10 @@ final Matcher isServerErrorParams = new MatchesJsonObject(
* "analysis": optional AnalysisStatus
* }
*/
-final Matcher isServerStatusParams = new MatchesJsonObject(
+final Matcher isServerStatusParams = new LazyMatcher(() => new MatchesJsonObject(
"server.status params", null, optionalFields: {
"analysis": isAnalysisStatus
- });
+ }));
/**
* analysis.getErrors params
@@ -100,10 +100,10 @@ final Matcher isServerStatusParams = new MatchesJsonObject(
* "file": FilePath
* }
*/
-final Matcher isAnalysisGetErrorsParams = new MatchesJsonObject(
+final Matcher isAnalysisGetErrorsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.getErrors params", {
"file": isFilePath
- });
+ }));
/**
* analysis.getErrors result
@@ -112,10 +112,10 @@ final Matcher isAnalysisGetErrorsParams = new MatchesJsonObject(
* "errors": List<AnalysisError>
* }
*/
-final Matcher isAnalysisGetErrorsResult = new MatchesJsonObject(
+final Matcher isAnalysisGetErrorsResult = new LazyMatcher(() => new MatchesJsonObject(
"analysis.getErrors result", {
"errors": isListOf(isAnalysisError)
- });
+ }));
/**
* analysis.getHover params
@@ -125,11 +125,11 @@ final Matcher isAnalysisGetErrorsResult = new MatchesJsonObject(
* "offset": int
* }
*/
-final Matcher isAnalysisGetHoverParams = new MatchesJsonObject(
+final Matcher isAnalysisGetHoverParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.getHover params", {
"file": isFilePath,
"offset": isInt
- });
+ }));
/**
* analysis.getHover result
@@ -138,10 +138,10 @@ final Matcher isAnalysisGetHoverParams = new MatchesJsonObject(
* "hovers": List<HoverInformation>
* }
*/
-final Matcher isAnalysisGetHoverResult = new MatchesJsonObject(
+final Matcher isAnalysisGetHoverResult = new LazyMatcher(() => new MatchesJsonObject(
"analysis.getHover result", {
"hovers": isListOf(isHoverInformation)
- });
+ }));
/**
* analysis.reanalyze params
@@ -161,11 +161,11 @@ final Matcher isAnalysisReanalyzeResult = isNull;
* "excluded": List<FilePath>
* }
*/
-final Matcher isAnalysisSetAnalysisRootsParams = new MatchesJsonObject(
+final Matcher isAnalysisSetAnalysisRootsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.setAnalysisRoots params", {
"included": isListOf(isFilePath),
"excluded": isListOf(isFilePath)
- });
+ }));
/**
* analysis.setAnalysisRoots result
@@ -179,10 +179,10 @@ final Matcher isAnalysisSetAnalysisRootsResult = isNull;
* "files": List<FilePath>
* }
*/
-final Matcher isAnalysisSetPriorityFilesParams = new MatchesJsonObject(
+final Matcher isAnalysisSetPriorityFilesParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.setPriorityFiles params", {
"files": isListOf(isFilePath)
- });
+ }));
/**
* analysis.setPriorityFiles result
@@ -196,10 +196,10 @@ final Matcher isAnalysisSetPriorityFilesResult = isNull;
* "subscriptions": Map<AnalysisService, List<FilePath>>
* }
*/
-final Matcher isAnalysisSetSubscriptionsParams = new MatchesJsonObject(
+final Matcher isAnalysisSetSubscriptionsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.setSubscriptions params", {
"subscriptions": isMapOf(isAnalysisService, isListOf(isFilePath))
- });
+ }));
/**
* analysis.setSubscriptions result
@@ -213,10 +213,10 @@ final Matcher isAnalysisSetSubscriptionsResult = isNull;
* "files": Map<FilePath, AddContentOverlay | ChangeContentOverlay | RemoveContentOverlay>
* }
*/
-final Matcher isAnalysisUpdateContentParams = new MatchesJsonObject(
+final Matcher isAnalysisUpdateContentParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.updateContent params", {
"files": isMapOf(isFilePath, isOneOf([isAddContentOverlay, isChangeContentOverlay, isRemoveContentOverlay]))
- });
+ }));
/**
* analysis.updateContent result
@@ -230,10 +230,10 @@ final Matcher isAnalysisUpdateContentResult = isNull;
* "options": AnalysisOptions
* }
*/
-final Matcher isAnalysisUpdateOptionsParams = new MatchesJsonObject(
+final Matcher isAnalysisUpdateOptionsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.updateOptions params", {
"options": isAnalysisOptions
- });
+ }));
/**
* analysis.updateOptions result
@@ -248,11 +248,11 @@ final Matcher isAnalysisUpdateOptionsResult = isNull;
* "errors": List<AnalysisError>
* }
*/
-final Matcher isAnalysisErrorsParams = new MatchesJsonObject(
+final Matcher isAnalysisErrorsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.errors params", {
"file": isFilePath,
"errors": isListOf(isAnalysisError)
- });
+ }));
/**
* analysis.flushResults params
@@ -261,10 +261,10 @@ final Matcher isAnalysisErrorsParams = new MatchesJsonObject(
* "files": List<FilePath>
* }
*/
-final Matcher isAnalysisFlushResultsParams = new MatchesJsonObject(
+final Matcher isAnalysisFlushResultsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.flushResults params", {
"files": isListOf(isFilePath)
- });
+ }));
/**
* analysis.folding params
@@ -274,11 +274,11 @@ final Matcher isAnalysisFlushResultsParams = new MatchesJsonObject(
* "regions": List<FoldingRegion>
* }
*/
-final Matcher isAnalysisFoldingParams = new MatchesJsonObject(
+final Matcher isAnalysisFoldingParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.folding params", {
"file": isFilePath,
"regions": isListOf(isFoldingRegion)
- });
+ }));
/**
* analysis.highlights params
@@ -288,11 +288,11 @@ final Matcher isAnalysisFoldingParams = new MatchesJsonObject(
* "regions": List<HighlightRegion>
* }
*/
-final Matcher isAnalysisHighlightsParams = new MatchesJsonObject(
+final Matcher isAnalysisHighlightsParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.highlights params", {
"file": isFilePath,
"regions": isListOf(isHighlightRegion)
- });
+ }));
/**
* analysis.navigation params
@@ -302,11 +302,11 @@ final Matcher isAnalysisHighlightsParams = new MatchesJsonObject(
* "regions": List<NavigationRegion>
* }
*/
-final Matcher isAnalysisNavigationParams = new MatchesJsonObject(
+final Matcher isAnalysisNavigationParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.navigation params", {
"file": isFilePath,
"regions": isListOf(isNavigationRegion)
- });
+ }));
/**
* analysis.occurrences params
@@ -316,11 +316,11 @@ final Matcher isAnalysisNavigationParams = new MatchesJsonObject(
* "occurrences": List<Occurrences>
* }
*/
-final Matcher isAnalysisOccurrencesParams = new MatchesJsonObject(
+final Matcher isAnalysisOccurrencesParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.occurrences params", {
"file": isFilePath,
"occurrences": isListOf(isOccurrences)
- });
+ }));
/**
* analysis.outline params
@@ -330,11 +330,11 @@ final Matcher isAnalysisOccurrencesParams = new MatchesJsonObject(
* "outline": Outline
* }
*/
-final Matcher isAnalysisOutlineParams = new MatchesJsonObject(
+final Matcher isAnalysisOutlineParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.outline params", {
"file": isFilePath,
"outline": isOutline
- });
+ }));
/**
* analysis.overrides params
@@ -344,11 +344,11 @@ final Matcher isAnalysisOutlineParams = new MatchesJsonObject(
* "overrides": List<Override>
* }
*/
-final Matcher isAnalysisOverridesParams = new MatchesJsonObject(
+final Matcher isAnalysisOverridesParams = new LazyMatcher(() => new MatchesJsonObject(
"analysis.overrides params", {
"file": isFilePath,
"overrides": isListOf(isOverride)
- });
+ }));
/**
* completion.getSuggestions params
@@ -358,11 +358,11 @@ final Matcher isAnalysisOverridesParams = new MatchesJsonObject(
* "offset": int
* }
*/
-final Matcher isCompletionGetSuggestionsParams = new MatchesJsonObject(
+final Matcher isCompletionGetSuggestionsParams = new LazyMatcher(() => new MatchesJsonObject(
"completion.getSuggestions params", {
"file": isFilePath,
"offset": isInt
- });
+ }));
/**
* completion.getSuggestions result
@@ -371,10 +371,10 @@ final Matcher isCompletionGetSuggestionsParams = new MatchesJsonObject(
* "id": CompletionId
* }
*/
-final Matcher isCompletionGetSuggestionsResult = new MatchesJsonObject(
+final Matcher isCompletionGetSuggestionsResult = new LazyMatcher(() => new MatchesJsonObject(
"completion.getSuggestions result", {
"id": isCompletionId
- });
+ }));
/**
* completion.results params
@@ -387,14 +387,14 @@ final Matcher isCompletionGetSuggestionsResult = new MatchesJsonObject(
* "last": bool
* }
*/
-final Matcher isCompletionResultsParams = new MatchesJsonObject(
+final Matcher isCompletionResultsParams = new LazyMatcher(() => new MatchesJsonObject(
"completion.results params", {
"id": isCompletionId,
"replacementOffset": isInt,
"replacementLength": isInt,
"results": isListOf(isCompletionSuggestion),
"last": isBool
- });
+ }));
/**
* search.findElementReferences params
@@ -405,12 +405,12 @@ final Matcher isCompletionResultsParams = new MatchesJsonObject(
* "includePotential": bool
* }
*/
-final Matcher isSearchFindElementReferencesParams = new MatchesJsonObject(
+final Matcher isSearchFindElementReferencesParams = new LazyMatcher(() => new MatchesJsonObject(
"search.findElementReferences params", {
"file": isFilePath,
"offset": isInt,
"includePotential": isBool
- });
+ }));
/**
* search.findElementReferences result
@@ -420,11 +420,11 @@ final Matcher isSearchFindElementReferencesParams = new MatchesJsonObject(
* "element": Element
* }
*/
-final Matcher isSearchFindElementReferencesResult = new MatchesJsonObject(
+final Matcher isSearchFindElementReferencesResult = new LazyMatcher(() => new MatchesJsonObject(
"search.findElementReferences result", {
"id": isSearchId,
"element": isElement
- });
+ }));
/**
* search.findMemberDeclarations params
@@ -433,10 +433,10 @@ final Matcher isSearchFindElementReferencesResult = new MatchesJsonObject(
* "name": String
* }
*/
-final Matcher isSearchFindMemberDeclarationsParams = new MatchesJsonObject(
+final Matcher isSearchFindMemberDeclarationsParams = new LazyMatcher(() => new MatchesJsonObject(
"search.findMemberDeclarations params", {
"name": isString
- });
+ }));
/**
* search.findMemberDeclarations result
@@ -445,10 +445,10 @@ final Matcher isSearchFindMemberDeclarationsParams = new MatchesJsonObject(
* "id": SearchId
* }
*/
-final Matcher isSearchFindMemberDeclarationsResult = new MatchesJsonObject(
+final Matcher isSearchFindMemberDeclarationsResult = new LazyMatcher(() => new MatchesJsonObject(
"search.findMemberDeclarations result", {
"id": isSearchId
- });
+ }));
/**
* search.findMemberReferences params
@@ -457,10 +457,10 @@ final Matcher isSearchFindMemberDeclarationsResult = new MatchesJsonObject(
* "name": String
* }
*/
-final Matcher isSearchFindMemberReferencesParams = new MatchesJsonObject(
+final Matcher isSearchFindMemberReferencesParams = new LazyMatcher(() => new MatchesJsonObject(
"search.findMemberReferences params", {
"name": isString
- });
+ }));
/**
* search.findMemberReferences result
@@ -469,10 +469,10 @@ final Matcher isSearchFindMemberReferencesParams = new MatchesJsonObject(
* "id": SearchId
* }
*/
-final Matcher isSearchFindMemberReferencesResult = new MatchesJsonObject(
+final Matcher isSearchFindMemberReferencesResult = new LazyMatcher(() => new MatchesJsonObject(
"search.findMemberReferences result", {
"id": isSearchId
- });
+ }));
/**
* search.findTopLevelDeclarations params
@@ -481,10 +481,10 @@ final Matcher isSearchFindMemberReferencesResult = new MatchesJsonObject(
* "pattern": String
* }
*/
-final Matcher isSearchFindTopLevelDeclarationsParams = new MatchesJsonObject(
+final Matcher isSearchFindTopLevelDeclarationsParams = new LazyMatcher(() => new MatchesJsonObject(
"search.findTopLevelDeclarations params", {
"pattern": isString
- });
+ }));
/**
* search.findTopLevelDeclarations result
@@ -493,10 +493,10 @@ final Matcher isSearchFindTopLevelDeclarationsParams = new MatchesJsonObject(
* "id": SearchId
* }
*/
-final Matcher isSearchFindTopLevelDeclarationsResult = new MatchesJsonObject(
+final Matcher isSearchFindTopLevelDeclarationsResult = new LazyMatcher(() => new MatchesJsonObject(
"search.findTopLevelDeclarations result", {
"id": isSearchId
- });
+ }));
/**
* search.getTypeHierarchy params
@@ -506,11 +506,11 @@ final Matcher isSearchFindTopLevelDeclarationsResult = new MatchesJsonObject(
* "offset": int
* }
*/
-final Matcher isSearchGetTypeHierarchyParams = new MatchesJsonObject(
+final Matcher isSearchGetTypeHierarchyParams = new LazyMatcher(() => new MatchesJsonObject(
"search.getTypeHierarchy params", {
"file": isFilePath,
"offset": isInt
- });
+ }));
/**
* search.getTypeHierarchy result
@@ -519,10 +519,10 @@ final Matcher isSearchGetTypeHierarchyParams = new MatchesJsonObject(
* "hierarchyItems": optional List<TypeHierarchyItem>
* }
*/
-final Matcher isSearchGetTypeHierarchyResult = new MatchesJsonObject(
+final Matcher isSearchGetTypeHierarchyResult = new LazyMatcher(() => new MatchesJsonObject(
"search.getTypeHierarchy result", null, optionalFields: {
"hierarchyItems": isListOf(isTypeHierarchyItem)
- });
+ }));
/**
* search.results params
@@ -533,12 +533,12 @@ final Matcher isSearchGetTypeHierarchyResult = new MatchesJsonObject(
* "last": bool
* }
*/
-final Matcher isSearchResultsParams = new MatchesJsonObject(
+final Matcher isSearchResultsParams = new LazyMatcher(() => new MatchesJsonObject(
"search.results params", {
"id": isSearchId,
"results": isListOf(isSearchResult),
"last": isBool
- });
+ }));
/**
* edit.getAssists params
@@ -549,12 +549,12 @@ final Matcher isSearchResultsParams = new MatchesJsonObject(
* "length": int
* }
*/
-final Matcher isEditGetAssistsParams = new MatchesJsonObject(
+final Matcher isEditGetAssistsParams = new LazyMatcher(() => new MatchesJsonObject(
"edit.getAssists params", {
"file": isFilePath,
"offset": isInt,
"length": isInt
- });
+ }));
/**
* edit.getAssists result
@@ -563,10 +563,10 @@ final Matcher isEditGetAssistsParams = new MatchesJsonObject(
* "assists": List<SourceChange>
* }
*/
-final Matcher isEditGetAssistsResult = new MatchesJsonObject(
+final Matcher isEditGetAssistsResult = new LazyMatcher(() => new MatchesJsonObject(
"edit.getAssists result", {
"assists": isListOf(isSourceChange)
- });
+ }));
/**
* edit.getAvailableRefactorings params
@@ -577,12 +577,12 @@ final Matcher isEditGetAssistsResult = new MatchesJsonObject(
* "length": int
* }
*/
-final Matcher isEditGetAvailableRefactoringsParams = new MatchesJsonObject(
+final Matcher isEditGetAvailableRefactoringsParams = new LazyMatcher(() => new MatchesJsonObject(
"edit.getAvailableRefactorings params", {
"file": isFilePath,
"offset": isInt,
"length": isInt
- });
+ }));
/**
* edit.getAvailableRefactorings result
@@ -591,10 +591,10 @@ final Matcher isEditGetAvailableRefactoringsParams = new MatchesJsonObject(
* "kinds": List<RefactoringKind>
* }
*/
-final Matcher isEditGetAvailableRefactoringsResult = new MatchesJsonObject(
+final Matcher isEditGetAvailableRefactoringsResult = new LazyMatcher(() => new MatchesJsonObject(
"edit.getAvailableRefactorings result", {
"kinds": isListOf(isRefactoringKind)
- });
+ }));
/**
* edit.getFixes params
@@ -604,11 +604,11 @@ final Matcher isEditGetAvailableRefactoringsResult = new MatchesJsonObject(
* "offset": int
* }
*/
-final Matcher isEditGetFixesParams = new MatchesJsonObject(
+final Matcher isEditGetFixesParams = new LazyMatcher(() => new MatchesJsonObject(
"edit.getFixes params", {
"file": isFilePath,
"offset": isInt
- });
+ }));
/**
* edit.getFixes result
@@ -617,10 +617,10 @@ final Matcher isEditGetFixesParams = new MatchesJsonObject(
* "fixes": List<ErrorFixes>
* }
*/
-final Matcher isEditGetFixesResult = new MatchesJsonObject(
+final Matcher isEditGetFixesResult = new LazyMatcher(() => new MatchesJsonObject(
"edit.getFixes result", {
"fixes": isListOf(isErrorFixes)
- });
+ }));
/**
* edit.getRefactoring params
@@ -634,7 +634,7 @@ final Matcher isEditGetFixesResult = new MatchesJsonObject(
* "options": optional object
* }
*/
-final Matcher isEditGetRefactoringParams = new MatchesJsonObject(
+final Matcher isEditGetRefactoringParams = new LazyMatcher(() => new MatchesJsonObject(
"edit.getRefactoring params", {
"kindId": isRefactoringKind,
"file": isFilePath,
@@ -643,7 +643,7 @@ final Matcher isEditGetRefactoringParams = new MatchesJsonObject(
"validateOnly": isBool
}, optionalFields: {
"options": isObject
- });
+ }));
/**
* edit.getRefactoring result
@@ -654,13 +654,13 @@ final Matcher isEditGetRefactoringParams = new MatchesJsonObject(
* "change": optional SourceChange
* }
*/
-final Matcher isEditGetRefactoringResult = new MatchesJsonObject(
+final Matcher isEditGetRefactoringResult = new LazyMatcher(() => new MatchesJsonObject(
"edit.getRefactoring result", {
"status": isListOf(isRefactoringProblem)
}, optionalFields: {
"feedback": isObject,
"change": isSourceChange
- });
+ }));
/**
* debug.createContext params
@@ -669,10 +669,10 @@ final Matcher isEditGetRefactoringResult = new MatchesJsonObject(
* "contextRoot": FilePath
* }
*/
-final Matcher isDebugCreateContextParams = new MatchesJsonObject(
+final Matcher isDebugCreateContextParams = new LazyMatcher(() => new MatchesJsonObject(
"debug.createContext params", {
"contextRoot": isFilePath
- });
+ }));
/**
* debug.createContext result
@@ -681,10 +681,10 @@ final Matcher isDebugCreateContextParams = new MatchesJsonObject(
* "id": DebugContextId
* }
*/
-final Matcher isDebugCreateContextResult = new MatchesJsonObject(
+final Matcher isDebugCreateContextResult = new LazyMatcher(() => new MatchesJsonObject(
"debug.createContext result", {
"id": isDebugContextId
- });
+ }));
/**
* debug.deleteContext params
@@ -693,10 +693,10 @@ final Matcher isDebugCreateContextResult = new MatchesJsonObject(
* "id": DebugContextId
* }
*/
-final Matcher isDebugDeleteContextParams = new MatchesJsonObject(
+final Matcher isDebugDeleteContextParams = new LazyMatcher(() => new MatchesJsonObject(
"debug.deleteContext params", {
"id": isDebugContextId
- });
+ }));
/**
* debug.deleteContext result
@@ -712,13 +712,13 @@ final Matcher isDebugDeleteContextResult = isNull;
* "uri": optional String
* }
*/
-final Matcher isDebugMapUriParams = new MatchesJsonObject(
+final Matcher isDebugMapUriParams = new LazyMatcher(() => new MatchesJsonObject(
"debug.mapUri params", {
"id": isDebugContextId
}, optionalFields: {
"file": isFilePath,
"uri": isString
- });
+ }));
/**
* debug.mapUri result
@@ -728,11 +728,11 @@ final Matcher isDebugMapUriParams = new MatchesJsonObject(
* "uri": optional String
* }
*/
-final Matcher isDebugMapUriResult = new MatchesJsonObject(
+final Matcher isDebugMapUriResult = new LazyMatcher(() => new MatchesJsonObject(
"debug.mapUri result", null, optionalFields: {
"file": isFilePath,
"uri": isString
- });
+ }));
/**
* debug.setSubscriptions params
@@ -741,10 +741,10 @@ final Matcher isDebugMapUriResult = new MatchesJsonObject(
* "subscriptions": List<DebugService>
* }
*/
-final Matcher isDebugSetSubscriptionsParams = new MatchesJsonObject(
+final Matcher isDebugSetSubscriptionsParams = new LazyMatcher(() => new MatchesJsonObject(
"debug.setSubscriptions params", {
"subscriptions": isListOf(isDebugService)
- });
+ }));
/**
* debug.setSubscriptions result
@@ -760,12 +760,12 @@ final Matcher isDebugSetSubscriptionsResult = isNull;
* "htmlToDart": Map<FilePath, List<FilePath>>
* }
*/
-final Matcher isDebugLaunchDataParams = new MatchesJsonObject(
+final Matcher isDebugLaunchDataParams = new LazyMatcher(() => new MatchesJsonObject(
"debug.launchData params", {
"executables": isListOf(isExecutableFile),
"dartToHtml": isMapOf(isFilePath, isListOf(isFilePath)),
"htmlToDart": isMapOf(isFilePath, isListOf(isFilePath))
- });
+ }));
/**
* AddContentOverlay
@@ -775,11 +775,11 @@ final Matcher isDebugLaunchDataParams = new MatchesJsonObject(
* "content": String
* }
*/
-final Matcher isAddContentOverlay = new MatchesJsonObject(
+final Matcher isAddContentOverlay = new LazyMatcher(() => new MatchesJsonObject(
"AddContentOverlay", {
"type": equals("add"),
"content": isString
- });
+ }));
/**
* AnalysisError
@@ -792,7 +792,7 @@ final Matcher isAddContentOverlay = new MatchesJsonObject(
* "correction": optional String
* }
*/
-final Matcher isAnalysisError = new MatchesJsonObject(
+final Matcher isAnalysisError = new LazyMatcher(() => new MatchesJsonObject(
"AnalysisError", {
"severity": isErrorSeverity,
"type": isErrorType,
@@ -800,7 +800,7 @@ final Matcher isAnalysisError = new MatchesJsonObject(
"message": isString
}, optionalFields: {
"correction": isString
- });
+ }));
/**
* AnalysisOptions
@@ -813,14 +813,14 @@ final Matcher isAnalysisError = new MatchesJsonObject(
* "generateHints": optional bool
* }
*/
-final Matcher isAnalysisOptions = new MatchesJsonObject(
+final Matcher isAnalysisOptions = new LazyMatcher(() => new MatchesJsonObject(
"AnalysisOptions", null, optionalFields: {
"enableAsync": isBool,
"enableDeferredLoading": isBool,
"enableEnums": isBool,
"generateDart2jsHints": isBool,
"generateHints": isBool
- });
+ }));
/**
* AnalysisService
@@ -851,12 +851,12 @@ final Matcher isAnalysisService = new MatchesEnum("AnalysisService", [
* "analysisTarget": optional String
* }
*/
-final Matcher isAnalysisStatus = new MatchesJsonObject(
+final Matcher isAnalysisStatus = new LazyMatcher(() => new MatchesJsonObject(
"AnalysisStatus", {
"analyzing": isBool
}, optionalFields: {
"analysisTarget": isString
- });
+ }));
/**
* ChangeContentOverlay
@@ -866,11 +866,11 @@ final Matcher isAnalysisStatus = new MatchesJsonObject(
* "edits": List<SourceEdit>
* }
*/
-final Matcher isChangeContentOverlay = new MatchesJsonObject(
+final Matcher isChangeContentOverlay = new LazyMatcher(() => new MatchesJsonObject(
"ChangeContentOverlay", {
"type": equals("change"),
"edits": isListOf(isSourceEdit)
- });
+ }));
/**
* CompletionId
@@ -917,7 +917,7 @@ final Matcher isCompletionRelevance = new MatchesEnum("CompletionRelevance", [
* "parameterType": optional String
* }
*/
-final Matcher isCompletionSuggestion = new MatchesJsonObject(
+final Matcher isCompletionSuggestion = new LazyMatcher(() => new MatchesJsonObject(
"CompletionSuggestion", {
"kind": isCompletionSuggestionKind,
"relevance": isCompletionRelevance,
@@ -937,7 +937,7 @@ final Matcher isCompletionSuggestion = new MatchesJsonObject(
"positionalParameterCount": isInt,
"parameterName": isString,
"parameterType": isString
- });
+ }));
/**
* CompletionSuggestionKind
@@ -1016,7 +1016,7 @@ final Matcher isDebugService = new MatchesEnum("DebugService", [
* "returnType": optional String
* }
*/
-final Matcher isElement = new MatchesJsonObject(
+final Matcher isElement = new LazyMatcher(() => new MatchesJsonObject(
"Element", {
"kind": isElementKind,
"name": isString,
@@ -1025,7 +1025,7 @@ final Matcher isElement = new MatchesJsonObject(
"location": isLocation,
"parameters": isString,
"returnType": isString
- });
+ }));
/**
* ElementKind
@@ -1081,13 +1081,13 @@ final Matcher isElementKind = new MatchesEnum("ElementKind", [
* "data": optional object
* }
*/
-final Matcher isError = new MatchesJsonObject(
+final Matcher isError = new LazyMatcher(() => new MatchesJsonObject(
"Error", {
"code": isString,
"message": isString
}, optionalFields: {
"data": isObject
- });
+ }));
/**
* ErrorFixes
@@ -1097,11 +1097,11 @@ final Matcher isError = new MatchesJsonObject(
* "fixes": List<SourceChange>
* }
*/
-final Matcher isErrorFixes = new MatchesJsonObject(
+final Matcher isErrorFixes = new LazyMatcher(() => new MatchesJsonObject(
"ErrorFixes", {
"error": isAnalysisError,
"fixes": isListOf(isSourceChange)
- });
+ }));
/**
* ErrorSeverity
@@ -1147,11 +1147,11 @@ final Matcher isErrorType = new MatchesEnum("ErrorType", [
* "offset": ExecutableKind
* }
*/
-final Matcher isExecutableFile = new MatchesJsonObject(
+final Matcher isExecutableFile = new LazyMatcher(() => new MatchesJsonObject(
"ExecutableFile", {
"file": isFilePath,
"offset": isExecutableKind
- });
+ }));
/**
* ExecutableKind
@@ -1203,12 +1203,12 @@ final Matcher isFoldingKind = new MatchesEnum("FoldingKind", [
* "length": int
* }
*/
-final Matcher isFoldingRegion = new MatchesJsonObject(
+final Matcher isFoldingRegion = new LazyMatcher(() => new MatchesJsonObject(
"FoldingRegion", {
"kind": isFoldingKind,
"offset": isInt,
"length": isInt
- });
+ }));
/**
* HighlightRegion
@@ -1219,12 +1219,12 @@ final Matcher isFoldingRegion = new MatchesJsonObject(
* "length": int
* }
*/
-final Matcher isHighlightRegion = new MatchesJsonObject(
+final Matcher isHighlightRegion = new LazyMatcher(() => new MatchesJsonObject(
"HighlightRegion", {
"type": isHighlightRegionType,
"offset": isInt,
"length": isInt
- });
+ }));
/**
* HighlightRegionType
@@ -1321,7 +1321,7 @@ final Matcher isHighlightRegionType = new MatchesEnum("HighlightRegionType", [
* "staticType": optional String
* }
*/
-final Matcher isHoverInformation = new MatchesJsonObject(
+final Matcher isHoverInformation = new LazyMatcher(() => new MatchesJsonObject(
"HoverInformation", {
"offset": isInt,
"length": isInt
@@ -1334,7 +1334,7 @@ final Matcher isHoverInformation = new MatchesJsonObject(
"parameter": isString,
"propagatedType": isString,
"staticType": isString
- });
+ }));
/**
* LinkedEditGroup
@@ -1345,12 +1345,12 @@ final Matcher isHoverInformation = new MatchesJsonObject(
* "suggestions": List<LinkedEditSuggestion>
* }
*/
-final Matcher isLinkedEditGroup = new MatchesJsonObject(
+final Matcher isLinkedEditGroup = new LazyMatcher(() => new MatchesJsonObject(
"LinkedEditGroup", {
"positions": isListOf(isPosition),
"length": isInt,
"suggestions": isListOf(isLinkedEditSuggestion)
- });
+ }));
/**
* LinkedEditSuggestion
@@ -1360,11 +1360,11 @@ final Matcher isLinkedEditGroup = new MatchesJsonObject(
* "kind": LinkedEditSuggestionKind
* }
*/
-final Matcher isLinkedEditSuggestion = new MatchesJsonObject(
+final Matcher isLinkedEditSuggestion = new LazyMatcher(() => new MatchesJsonObject(
"LinkedEditSuggestion", {
"value": isString,
"kind": isLinkedEditSuggestionKind
- });
+ }));
/**
* LinkedEditSuggestionKind
@@ -1394,14 +1394,14 @@ final Matcher isLinkedEditSuggestionKind = new MatchesEnum("LinkedEditSuggestion
* "startColumn": int
* }
*/
-final Matcher isLocation = new MatchesJsonObject(
+final Matcher isLocation = new LazyMatcher(() => new MatchesJsonObject(
"Location", {
"file": isFilePath,
"offset": isInt,
"length": isInt,
"startLine": isInt,
"startColumn": isInt
- });
+ }));
/**
* NavigationRegion
@@ -1412,12 +1412,12 @@ final Matcher isLocation = new MatchesJsonObject(
* "targets": List<Element>
* }
*/
-final Matcher isNavigationRegion = new MatchesJsonObject(
+final Matcher isNavigationRegion = new LazyMatcher(() => new MatchesJsonObject(
"NavigationRegion", {
"offset": isInt,
"length": isInt,
"targets": isListOf(isElement)
- });
+ }));
/**
* Occurrences
@@ -1428,12 +1428,12 @@ final Matcher isNavigationRegion = new MatchesJsonObject(
* "length": int
* }
*/
-final Matcher isOccurrences = new MatchesJsonObject(
+final Matcher isOccurrences = new LazyMatcher(() => new MatchesJsonObject(
"Occurrences", {
"element": isElement,
"offsets": isListOf(isInt),
"length": isInt
- });
+ }));
/**
* Outline
@@ -1445,14 +1445,14 @@ final Matcher isOccurrences = new MatchesJsonObject(
* "children": optional List<Outline>
* }
*/
-final Matcher isOutline = new MatchesJsonObject(
+final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject(
"Outline", {
"element": isElement,
"offset": isInt,
"length": isInt
}, optionalFields: {
"children": isListOf(isOutline)
- });
+ }));
/**
* Override
@@ -1464,14 +1464,14 @@ final Matcher isOutline = new MatchesJsonObject(
* "interfaceMembers": optional List<OverriddenMember>
* }
*/
-final Matcher isOverride = new MatchesJsonObject(
+final Matcher isOverride = new LazyMatcher(() => new MatchesJsonObject(
"Override", {
"offset": isInt,
"length": isInt
}, optionalFields: {
"superclassMember": isOverriddenMember,
"interfaceMembers": isListOf(isOverriddenMember)
- });
+ }));
/**
* OverriddenMember
@@ -1481,11 +1481,11 @@ final Matcher isOverride = new MatchesJsonObject(
* "className": String
* }
*/
-final Matcher isOverriddenMember = new MatchesJsonObject(
+final Matcher isOverriddenMember = new LazyMatcher(() => new MatchesJsonObject(
"OverriddenMember", {
"element": isElement,
"className": isString
- });
+ }));
/**
* Position
@@ -1495,11 +1495,11 @@ final Matcher isOverriddenMember = new MatchesJsonObject(
* "offset": int
* }
*/
-final Matcher isPosition = new MatchesJsonObject(
+final Matcher isPosition = new LazyMatcher(() => new MatchesJsonObject(
"Position", {
"file": isFilePath,
"offset": isInt
- });
+ }));
/**
* RefactoringKind
@@ -1535,7 +1535,7 @@ final Matcher isRefactoringKind = new MatchesEnum("RefactoringKind", [
* "parameters": optional String
* }
*/
-final Matcher isRefactoringMethodParameter = new MatchesJsonObject(
+final Matcher isRefactoringMethodParameter = new LazyMatcher(() => new MatchesJsonObject(
"RefactoringMethodParameter", {
"kind": isRefactoringMethodParameterKind,
"type": isString,
@@ -1543,7 +1543,7 @@ final Matcher isRefactoringMethodParameter = new MatchesJsonObject(
}, optionalFields: {
"id": isString,
"parameters": isString
- });
+ }));
/**
* RefactoringMethodParameterKind
@@ -1569,12 +1569,12 @@ final Matcher isRefactoringMethodParameterKind = new MatchesEnum("RefactoringMet
* "location": Location
* }
*/
-final Matcher isRefactoringProblem = new MatchesJsonObject(
+final Matcher isRefactoringProblem = new LazyMatcher(() => new MatchesJsonObject(
"RefactoringProblem", {
"severity": isRefactoringProblemSeverity,
"message": isString,
"location": isLocation
- });
+ }));
/**
* RefactoringProblemSeverity
@@ -1600,10 +1600,10 @@ final Matcher isRefactoringProblemSeverity = new MatchesEnum("RefactoringProblem
* "type": "remove"
* }
*/
-final Matcher isRemoveContentOverlay = new MatchesJsonObject(
+final Matcher isRemoveContentOverlay = new LazyMatcher(() => new MatchesJsonObject(
"RemoveContentOverlay", {
"type": equals("remove")
- });
+ }));
/**
* SearchId
@@ -1622,13 +1622,13 @@ final Matcher isSearchId = isString;
* "path": List<Element>
* }
*/
-final Matcher isSearchResult = new MatchesJsonObject(
+final Matcher isSearchResult = new LazyMatcher(() => new MatchesJsonObject(
"SearchResult", {
"location": isLocation,
"kind": isSearchResultKind,
"isPotential": isBool,
"path": isListOf(isElement)
- });
+ }));
/**
* SearchResultKind
@@ -1672,14 +1672,14 @@ final Matcher isServerService = new MatchesEnum("ServerService", [
* "selection": optional Position
* }
*/
-final Matcher isSourceChange = new MatchesJsonObject(
+final Matcher isSourceChange = new LazyMatcher(() => new MatchesJsonObject(
"SourceChange", {
"message": isString,
"edits": isListOf(isSourceFileEdit),
"linkedEditGroups": isListOf(isLinkedEditGroup)
}, optionalFields: {
"selection": isPosition
- });
+ }));
/**
* SourceEdit
@@ -1690,12 +1690,12 @@ final Matcher isSourceChange = new MatchesJsonObject(
* "replacement": String
* }
*/
-final Matcher isSourceEdit = new MatchesJsonObject(
+final Matcher isSourceEdit = new LazyMatcher(() => new MatchesJsonObject(
"SourceEdit", {
"offset": isInt,
"length": isInt,
"replacement": isString
- });
+ }));
/**
* SourceFileEdit
@@ -1705,11 +1705,11 @@ final Matcher isSourceEdit = new MatchesJsonObject(
* "edits": List<SourceEdit>
* }
*/
-final Matcher isSourceFileEdit = new MatchesJsonObject(
+final Matcher isSourceFileEdit = new LazyMatcher(() => new MatchesJsonObject(
"SourceFileEdit", {
"file": isFilePath,
"edits": isListOf(isSourceEdit)
- });
+ }));
/**
* TypeHierarchyItem
@@ -1724,7 +1724,7 @@ final Matcher isSourceFileEdit = new MatchesJsonObject(
* "subclasses": List<int>
* }
*/
-final Matcher isTypeHierarchyItem = new MatchesJsonObject(
+final Matcher isTypeHierarchyItem = new LazyMatcher(() => new MatchesJsonObject(
"TypeHierarchyItem", {
"classElement": isElement,
"interfaces": isListOf(isInt),
@@ -1734,7 +1734,7 @@ final Matcher isTypeHierarchyItem = new MatchesJsonObject(
"displayName": isString,
"memberElement": isElement,
"superclass": isInt
- });
+ }));
/**
* convertGetterToMethod feedback
@@ -1765,12 +1765,12 @@ final Matcher isConvertMethodToGetterOptions = isNull;
* "lengths": List<int>
* }
*/
-final Matcher isExtractLocalVariableFeedback = new MatchesJsonObject(
+final Matcher isExtractLocalVariableFeedback = new LazyMatcher(() => new MatchesJsonObject(
"extractLocalVariable feedback", {
"names": isListOf(isString),
"offsets": isListOf(isInt),
"lengths": isListOf(isInt)
- });
+ }));
/**
* extractLocalVariable options
@@ -1780,11 +1780,11 @@ final Matcher isExtractLocalVariableFeedback = new MatchesJsonObject(
* "extractAll": bool
* }
*/
-final Matcher isExtractLocalVariableOptions = new MatchesJsonObject(
+final Matcher isExtractLocalVariableOptions = new LazyMatcher(() => new MatchesJsonObject(
"extractLocalVariable options", {
"name": isString,
"extractAll": isBool
- });
+ }));
/**
* extractMethod feedback
@@ -1801,7 +1801,7 @@ final Matcher isExtractLocalVariableOptions = new MatchesJsonObject(
* "lengths": List<int>
* }
*/
-final Matcher isExtractMethodFeedback = new MatchesJsonObject(
+final Matcher isExtractMethodFeedback = new LazyMatcher(() => new MatchesJsonObject(
"extractMethod feedback", {
"offset": isInt,
"length": isInt,
@@ -1812,7 +1812,7 @@ final Matcher isExtractMethodFeedback = new MatchesJsonObject(
"occurrences": isInt,
"offsets": isListOf(isInt),
"lengths": isListOf(isInt)
- });
+ }));
/**
* extractMethod options
@@ -1825,14 +1825,14 @@ final Matcher isExtractMethodFeedback = new MatchesJsonObject(
* "extractAll": bool
* }
*/
-final Matcher isExtractMethodOptions = new MatchesJsonObject(
+final Matcher isExtractMethodOptions = new LazyMatcher(() => new MatchesJsonObject(
"extractMethod options", {
"returnType": isString,
"createGetter": isBool,
"name": isString,
"parameters": isListOf(isRefactoringMethodParameter),
"extractAll": isBool
- });
+ }));
/**
* inlineLocalVariable feedback
@@ -1857,11 +1857,11 @@ final Matcher isInlineMethodFeedback = isNull;
* "inlineAll": bool
* }
*/
-final Matcher isInlineMethodOptions = new MatchesJsonObject(
+final Matcher isInlineMethodOptions = new LazyMatcher(() => new MatchesJsonObject(
"inlineMethod options", {
"deleteSource": isBool,
"inlineAll": isBool
- });
+ }));
/**
* rename feedback
@@ -1871,11 +1871,11 @@ final Matcher isInlineMethodOptions = new MatchesJsonObject(
* "length": int
* }
*/
-final Matcher isRenameFeedback = new MatchesJsonObject(
+final Matcher isRenameFeedback = new LazyMatcher(() => new MatchesJsonObject(
"rename feedback", {
"offset": isInt,
"length": isInt
- });
+ }));
/**
* rename options
@@ -1884,8 +1884,8 @@ final Matcher isRenameFeedback = new MatchesJsonObject(
* "newName": String
* }
*/
-final Matcher isRenameOptions = new MatchesJsonObject(
+final Matcher isRenameOptions = new LazyMatcher(() => new MatchesJsonObject(
"rename options", {
"newName": isString
- });
+ }));
« no previous file with comments | « pkg/analysis_server/test/integration/integration_tests.dart ('k') | pkg/analysis_server/tool/spec/codegen_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698