Fix an analysis server test.

BUG=

Review URL: https://codereview.chromium.org/2294163002 .
This commit is contained in:
Devon Carew 2016-08-30 17:58:31 -07:00
parent 39c828f4a9
commit c3e64df2af

View file

@ -32,7 +32,7 @@ abstract class IntegrationTestMixin {
*
* Returns
*
* version ( String )
* version (String)
*
* The version number of the analysis server.
*/
@ -65,7 +65,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* subscriptions ( List<ServerService> )
* subscriptions (List<ServerService>)
*
* A list of the services being subscribed to.
*/
@ -85,11 +85,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* version ( String )
* version (String)
*
* The version number of the analysis server.
*
* pid ( int )
* pid (int)
*
* The process id of the analysis server process.
*/
@ -111,16 +111,16 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* isFatal ( bool )
* isFatal (bool)
*
* True if the error is a fatal error, meaning that the server will
* shutdown automatically after sending this notification.
*
* message ( String )
* message (String)
*
* The error message indicating what kind of error was encountered.
*
* stackTrace ( String )
* stackTrace (String)
*
* The stack trace associated with the generation of the error, used for
* debugging the server.
@ -142,12 +142,12 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* analysis ( optional AnalysisStatus )
* analysis (optional AnalysisStatus)
*
* The current status of analysis, including whether analysis is being
* performed and if so what is being analyzed.
*
* pub ( optional PubStatus )
* pub (optional PubStatus)
*
* The current status of pub execution, indicating whether we are currently
* running pub.
@ -182,13 +182,13 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file for which errors are being requested.
*
* Returns
*
* errors ( List<AnalysisError> )
* errors (List<AnalysisError>)
*
* The errors associated with the file.
*/
@ -206,17 +206,17 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file in which hover information is being requested.
*
* offset ( int )
* offset (int)
*
* The offset for which hover information is being requested.
*
* Returns
*
* hovers ( List<HoverInformation> )
* hovers (List<HoverInformation>)
*
* The hover information associated with the location. The list will be
* empty if no information could be determined for the location. The list
@ -241,13 +241,13 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file for which reachable source information is being requested.
*
* Returns
*
* sources ( Map<String, List<String>> )
* sources (Map<String, List<String>>)
*
* A mapping from source URIs to directly reachable source URIs. For
* example, a file "foo.dart" that imports "bar.dart" would have the
@ -273,12 +273,12 @@ abstract class IntegrationTestMixin {
*
* Returns
*
* libraries ( List<FilePath> )
* libraries (List<FilePath>)
*
* A list of the paths of library elements referenced by files in existing
* analysis roots.
*
* packageMap ( Map<String, Map<String, List<FilePath>>> )
* packageMap (Map<String, Map<String, List<FilePath>>>)
*
* A mapping from context source roots to package maps which map package
* names to source directories for use in client-side package URI
@ -313,33 +313,33 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file in which navigation information is being requested.
*
* offset ( int )
* offset (int)
*
* The offset of the region for which navigation information is being
* requested.
*
* length ( int )
* length (int)
*
* The length of the region for which navigation information is being
* requested.
*
* Returns
*
* files ( List<FilePath> )
* files (List<FilePath>)
*
* A list of the paths of files that are referenced by the navigation
* targets.
*
* targets ( List<NavigationTarget> )
* targets (List<NavigationTarget>)
*
* A list of the navigation targets that are referenced by the navigation
* regions.
*
* regions ( List<NavigationRegion> )
* regions (List<NavigationRegion>)
*
* A list of the navigation regions within the requested region of the
* file.
@ -365,7 +365,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* roots ( optional List<FilePath> )
* roots (optional List<FilePath>)
*
* A list of the analysis roots that are to be re-analyzed.
*/
@ -404,16 +404,16 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* included ( List<FilePath> )
* included (List<FilePath>)
*
* A list of the files and directories that should be analyzed.
*
* excluded ( List<FilePath> )
* excluded (List<FilePath>)
*
* A list of the files and directories within the included directories that
* should not be analyzed.
*
* packageRoots ( optional Map<FilePath, FilePath> )
* packageRoots (optional Map<FilePath, FilePath>)
*
* A mapping from source directories to package roots that should override
* the normal package: URI resolution mechanism.
@ -453,7 +453,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* subscriptions ( List<GeneralAnalysisService> )
* subscriptions (List<GeneralAnalysisService>)
*
* A list of the services being subscribed to.
*/
@ -485,7 +485,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* files ( List<FilePath> )
* files (List<FilePath>)
*
* The files that are to be a priority for analysis.
*/
@ -523,7 +523,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* subscriptions ( Map<AnalysisService, List<FilePath>> )
* subscriptions (Map<AnalysisService, List<FilePath>>)
*
* A table mapping services to a list of the files being subscribed to the
* service.
@ -545,8 +545,8 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* files ( Map<FilePath, AddContentOverlay | ChangeContentOverlay |
* RemoveContentOverlay> )
* files (Map<FilePath, AddContentOverlay | ChangeContentOverlay |
* RemoveContentOverlay>)
*
* A table mapping the files whose content has changed to a description of
* the content change.
@ -568,7 +568,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* options ( AnalysisOptions )
* options (AnalysisOptions)
*
* The options that are to be used to control analysis.
*/
@ -588,7 +588,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* directories ( List<FilePath> )
* directories (List<FilePath>)
*
* A list of the paths of the files that are being analyzed.
*/
@ -609,11 +609,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the errors.
*
* errors ( List<AnalysisError> )
* errors (List<AnalysisError>)
*
* The errors contained in the file.
*/
@ -639,7 +639,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* files ( List<FilePath> )
* files (List<FilePath>)
*
* The files that are no longer being analyzed.
*/
@ -662,11 +662,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the folding regions.
*
* regions ( List<FoldingRegion> )
* regions (List<FoldingRegion>)
*
* The folding regions contained in the file.
*/
@ -686,11 +686,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the highlight regions.
*
* regions ( List<HighlightRegion> )
* regions (List<HighlightRegion>)
*
* The highlight regions contained in the file. Each highlight region
* represents a particular syntactic or semantic meaning associated with
@ -715,15 +715,15 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file with which the implementations are associated.
*
* classes ( List<ImplementedClass> )
* classes (List<ImplementedClass>)
*
* The classes defined in the file that are implemented or extended.
*
* members ( List<ImplementedMember> )
* members (List<ImplementedMember>)
*
* The member defined in the file that are implemented or overridden.
*/
@ -744,19 +744,19 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file whose information has been invalidated.
*
* offset ( int )
* offset (int)
*
* The offset of the invalidated region.
*
* length ( int )
* length (int)
*
* The length of the invalidated region.
*
* delta ( int )
* delta (int)
*
* The delta to be applied to the offsets in information that follows the
* invalidated region in order to update it so that it doesn't need to be
@ -778,11 +778,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the navigation regions.
*
* regions ( List<NavigationRegion> )
* regions (List<NavigationRegion>)
*
* The navigation regions contained in the file. The regions are sorted by
* their offsets. Each navigation region represents a list of targets
@ -792,12 +792,12 @@ abstract class IntegrationTestMixin {
* versions of a package. Note that the navigation regions that are
* returned do not overlap other navigation regions.
*
* targets ( List<NavigationTarget> )
* targets (List<NavigationTarget>)
*
* The navigation targets referenced in the file. They are referenced by
* NavigationRegions by their index in this array.
*
* files ( List<FilePath> )
* files (List<FilePath>)
*
* The files containing navigation targets referenced in the file. They are
* referenced by NavigationTargets by their index in this array.
@ -818,11 +818,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file in which the references occur.
*
* occurrences ( List<Occurrences> )
* occurrences (List<Occurrences>)
*
* The occurrences of references to elements within the file.
*/
@ -842,15 +842,15 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file with which the outline is associated.
*
* kind ( FileKind )
* kind (FileKind)
*
* The kind of the file.
*
* libraryName ( optional String )
* libraryName (optional String)
*
* The name of the library defined by the file using a "library" directive,
* or referenced by a "part of" directive. If both "library" and "part of"
@ -858,7 +858,7 @@ abstract class IntegrationTestMixin {
* This field will be omitted if the file has neither "library" nor "part
* of" directives.
*
* outline ( Outline )
* outline (Outline)
*
* The outline associated with the file.
*/
@ -878,11 +878,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file with which the overrides are associated.
*
* overrides ( List<Override> )
* overrides (List<Override>)
*
* The overrides associated with the file.
*/
@ -899,17 +899,17 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the point at which suggestions are to be made.
*
* offset ( int )
* offset (int)
*
* The offset within the file at which suggestions are to be made.
*
* Returns
*
* id ( CompletionId )
* id (CompletionId)
*
* The identifier used to associate results with this completion request.
*/
@ -927,11 +927,11 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* id ( CompletionId )
* id (CompletionId)
*
* The id associated with the completion.
*
* replacementOffset ( int )
* replacementOffset (int)
*
* The offset of the start of the text to be replaced. This will be
* different than the offset used to request the completion suggestions if
@ -939,13 +939,13 @@ abstract class IntegrationTestMixin {
* particular, the replacementOffset will be the offset of the beginning of
* said identifier.
*
* replacementLength ( int )
* replacementLength (int)
*
* The length of the text to be replaced if the remainder of the identifier
* containing the cursor is to be replaced when the suggestion is applied
* (that is, the number of characters in the existing identifier).
*
* results ( List<CompletionSuggestion> )
* results (List<CompletionSuggestion>)
*
* The completion suggestions being reported. The notification contains all
* possible completions at the requested cursor position, even those that
@ -953,7 +953,7 @@ abstract class IntegrationTestMixin {
* client to respond to further keystrokes from the user without having to
* make additional requests.
*
* isLast ( bool )
* isLast (bool)
*
* True if this is that last set of results that will be returned for the
* indicated completion.
@ -974,23 +974,23 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the declaration of or reference to the element used
* to define the search.
*
* offset ( int )
* offset (int)
*
* The offset within the file of the declaration of or reference to the
* element.
*
* includePotential ( bool )
* includePotential (bool)
*
* True if potential matches are to be included in the results.
*
* Returns
*
* id ( optional SearchId )
* id (optional SearchId)
*
* The identifier used to associate results with this search request.
*
@ -998,7 +998,7 @@ abstract class IntegrationTestMixin {
* absent, and no results will be reported via the search.results
* notification.
*
* element ( optional Element )
* element (optional Element)
*
* The element referenced or defined at the given offset and whose
* references will be returned in the search results.
@ -1022,13 +1022,13 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* name ( String )
* name (String)
*
* The name of the declarations to be found.
*
* Returns
*
* id ( SearchId )
* id (SearchId)
*
* The identifier used to associate results with this search request.
*/
@ -1050,13 +1050,13 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* name ( String )
* name (String)
*
* The name of the references to be found.
*
* Returns
*
* id ( SearchId )
* id (SearchId)
*
* The identifier used to associate results with this search request.
*/
@ -1077,14 +1077,14 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* pattern ( String )
* pattern (String)
*
* The regular expression used to match the names of the declarations to be
* found.
*
* Returns
*
* id ( SearchId )
* id (SearchId)
*
* The identifier used to associate results with this search request.
*/
@ -1101,23 +1101,23 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the declaration or reference to the type for which a
* hierarchy is being requested.
*
* offset ( int )
* offset (int)
*
* The offset of the name of the type within the file.
*
* superOnly ( optional bool )
* superOnly (optional bool)
*
* True if the client is only requesting superclasses and interfaces
* hierarchy.
*
* Returns
*
* hierarchyItems ( optional List<TypeHierarchyItem> )
* hierarchyItems (optional List<TypeHierarchyItem>)
*
* A list of the types in the requested hierarchy. The first element of the
* list is the item representing the type for which the hierarchy was
@ -1144,15 +1144,15 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* id ( SearchId )
* id (SearchId)
*
* The id associated with the search.
*
* results ( List<SearchResult> )
* results (List<SearchResult>)
*
* The search results being reported.
*
* isLast ( bool )
* isLast (bool)
*
* True if this is that last set of results that will be returned for the
* indicated search.
@ -1181,34 +1181,34 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the code to be formatted.
*
* selectionOffset ( int )
* selectionOffset (int)
*
* The offset of the current selection in the file.
*
* selectionLength ( int )
* selectionLength (int)
*
* The length of the current selection in the file.
*
* lineLength ( optional int )
* lineLength (optional int)
*
* The line length to be used by the formatter.
*
* Returns
*
* edits ( List<SourceEdit> )
* edits (List<SourceEdit>)
*
* The edit(s) to be applied in order to format the code. The list will be
* empty if the code was already formatted (there are no changes).
*
* selectionOffset ( int )
* selectionOffset (int)
*
* The offset of the selection after formatting the code.
*
* selectionLength ( int )
* selectionLength (int)
*
* The length of the selection after formatting the code.
*/
@ -1227,21 +1227,21 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the code for which assists are being requested.
*
* offset ( int )
* offset (int)
*
* The offset of the code for which assists are being requested.
*
* length ( int )
* length (int)
*
* The length of the code for which assists are being requested.
*
* Returns
*
* assists ( List<SourceChange> )
* assists (List<SourceChange>)
*
* The assists that are available at the given location.
*/
@ -1258,21 +1258,21 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the code on which the refactoring would be based.
*
* offset ( int )
* offset (int)
*
* The offset of the code on which the refactoring would be based.
*
* length ( int )
* length (int)
*
* The length of the code on which the refactoring would be based.
*
* Returns
*
* kinds ( List<RefactoringKind> )
* kinds (List<RefactoringKind>)
*
* The kinds of refactorings that are valid for the given selection.
*/
@ -1289,17 +1289,17 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the errors for which fixes are being requested.
*
* offset ( int )
* offset (int)
*
* The offset used to select the errors for which fixes will be returned.
*
* Returns
*
* fixes ( List<AnalysisErrorFixes> )
* fixes (List<AnalysisErrorFixes>)
*
* The fixes that are available for the errors at the given offset.
*/
@ -1318,28 +1318,28 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* kind ( RefactoringKind )
* kind (RefactoringKind)
*
* The kind of refactoring to be performed.
*
* file ( FilePath )
* file (FilePath)
*
* The file containing the code involved in the refactoring.
*
* offset ( int )
* offset (int)
*
* The offset of the region involved in the refactoring.
*
* length ( int )
* length (int)
*
* The length of the region involved in the refactoring.
*
* validateOnly ( bool )
* validateOnly (bool)
*
* True if the client is only requesting that the values of the options be
* validated and no change be generated.
*
* options ( optional RefactoringOptions )
* options (optional RefactoringOptions)
*
* Data used to provide values provided by the user. The structure of the
* data is dependent on the kind of refactoring being performed. The data
@ -1349,39 +1349,39 @@ abstract class IntegrationTestMixin {
*
* Returns
*
* initialProblems ( List<RefactoringProblem> )
* initialProblems (List<RefactoringProblem>)
*
* The initial status of the refactoring, i.e. problems related to the
* context in which the refactoring is requested. The array will be empty
* if there are no known problems.
*
* optionsProblems ( List<RefactoringProblem> )
* optionsProblems (List<RefactoringProblem>)
*
* The options validation status, i.e. problems in the given options, such
* as light-weight validation of a new name, flags compatibility, etc. The
* array will be empty if there are no known problems.
*
* finalProblems ( List<RefactoringProblem> )
* finalProblems (List<RefactoringProblem>)
*
* The final status of the refactoring, i.e. problems identified in the
* result of a full, potentially expensive validation and / or change
* creation. The array will be empty if there are no known problems.
*
* feedback ( optional RefactoringFeedback )
* feedback (optional RefactoringFeedback)
*
* Data used to provide feedback to the user. The structure of the data is
* dependent on the kind of refactoring being created. The data that is
* returned is documented in the section titled Refactorings, labeled as
* Feedback.
*
* change ( optional SourceChange )
* change (optional SourceChange)
*
* The changes that are to be applied to affect the refactoring. This field
* will be omitted if there are problems that prevent a set of changes from
* being computed, such as having no options specified for a refactoring
* that requires them, or if only validation was requested.
*
* potentialEdits ( optional List<String> )
* potentialEdits (optional List<String>)
*
* The ids of source edits that are not known to be valid. An edit is not
* known to be valid if there was insufficient type information for the
@ -1410,13 +1410,13 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The Dart file to sort.
*
* Returns
*
* edit ( SourceFileEdit )
* edit (SourceFileEdit)
*
* The file edit that is to be applied to the given file to effect the
* sorting.
@ -1441,13 +1441,13 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The Dart file to organize directives in.
*
* Returns
*
* edit ( SourceFileEdit )
* edit (SourceFileEdit)
*
* The file edit that is to be applied to the given file to effect the
* organizing.
@ -1467,14 +1467,14 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* contextRoot ( FilePath )
* contextRoot (FilePath)
*
* The path of the Dart or HTML file that will be launched, or the path of
* the directory containing the file.
*
* Returns
*
* id ( ExecutionContextId )
* id (ExecutionContextId)
*
* The identifier used to refer to the execution context that was created.
*/
@ -1492,7 +1492,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* id ( ExecutionContextId )
* id (ExecutionContextId)
*
* The identifier of the execution context that is to be deleted.
*/
@ -1526,27 +1526,27 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* id ( ExecutionContextId )
* id (ExecutionContextId)
*
* The identifier of the execution context in which the URI is to be
* mapped.
*
* file ( optional FilePath )
* file (optional FilePath)
*
* The path of the file to be mapped into a URI.
*
* uri ( optional String )
* uri (optional String)
*
* The URI to be mapped into a file path.
*
* Returns
*
* file ( optional FilePath )
* file (optional FilePath)
*
* The file to which the URI was mapped. This field is omitted if the uri
* field was not given in the request.
*
* uri ( optional String )
* uri (optional String)
*
* The URI to which the file path was mapped. This field is omitted if the
* file field was not given in the request.
@ -1568,7 +1568,7 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* subscriptions ( List<ExecutionService> )
* subscriptions (List<ExecutionService>)
*
* A list of the services being subscribed to.
*/
@ -1588,17 +1588,17 @@ abstract class IntegrationTestMixin {
*
* Parameters
*
* file ( FilePath )
* file (FilePath)
*
* The file for which launch data is being provided. This will either be a
* Dart library or an HTML file.
*
* kind ( optional ExecutableKind )
* kind (optional ExecutableKind)
*
* The kind of the executable file. This field is omitted if the file is
* not a Dart file.
*
* referencedFiles ( optional List<FilePath> )
* referencedFiles (optional List<FilePath>)
*
* A list of the Dart files that are referenced by the file. This field is
* omitted if the file is not an HTML file.
@ -1615,7 +1615,7 @@ abstract class IntegrationTestMixin {
*
* Returns
*
* contexts ( List<ContextData> )
* contexts (List<ContextData>)
*
* The list of analysis contexts.
*/