Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlining VSI tests #18508

Merged
merged 2 commits into from
Apr 7, 2017
Merged

Outlining VSI tests #18508

merged 2 commits into from
Apr 7, 2017

Conversation

rchande
Copy link
Contributor

@rchande rchande commented Apr 6, 2017

tag @dotnet/roslyn-ide for review

@@ -0,0 +1,89 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing these top usings are unused.

Verify(spans, "Debug");
}

private void Verify(IDictionary<string, ImmutableArray<TextSpan>> spans, string configuration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VerifySpansInConfiguration or something? Just Verify makes the test method hard to read. It's probably fine since there's only one usage, but if someone added more tests that use it it'd get annoying.

@@ -0,0 +1,46 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usings?

@@ -259,6 +259,9 @@ public bool IsNavBarEnabled()
public TextSpan[] GetKeywordHighlightTags()
=> Deserialize(_editorInProc.GetHighlightTags());

public TextSpan[] GetOutliningSpans()
=> Deserialize(_editorInProc.GetOutliningSpans());

private TextSpan[] Deserialize(string[] v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeserializeTags?

}|]";
MarkupTestFile.GetSpans(input, out var text, out ImmutableArray<TextSpan> spans);
VisualStudio.Editor.SetText(text);
VisualStudio.Workspace.WaitForAsyncOperations(FeatureAttribute.Outlining);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No direct waits in tests; the wait should be moved to .GetOutliningSpans().

@rchande rchande force-pushed the outliningintegrationtest branch from 762068a to eec4687 Compare April 7, 2017 20:32
@rchande rchande dismissed jasonmalinowski’s stale review April 7, 2017 21:00

Moved wait into helper

@rchande rchande merged commit fcf1c1c into dotnet:master Apr 7, 2017
@rchande rchande deleted the outliningintegrationtest branch April 7, 2017 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants