Skip to content

Commit

Permalink
Port Rename and Formatting tests to the new framework
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Feb 23, 2023
1 parent 4752934 commit ab0f5dd
Show file tree
Hide file tree
Showing 25 changed files with 1,594 additions and 1,910 deletions.
2 changes: 1 addition & 1 deletion docs/wiki/Manual-Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ When doing a test pass, copy this page and consider using these status indicator
| **Typing** | :fast_forward: **General Typing**<br />- Type and paste new constructs<br />- Nothing interferes with verbatim typing | | | |
| | :mag: :fast_forward: **Completion**<br />- Typing new keyword/construct names<br />- Dotting off of new constructs<br />- Matching part of the identifier is highlighted (including word prefix matches) [Visual Studio 2015 Update 1]<br />- Target type preselection [Visual Studio 2017]<br />IntelliSense filtering [Visual Studio 2017] | | | |
| | :fast_forward: **Formatting** <br />- Spacing in and around new constructs<br />- Spacing options<br />- Format Document command<br /> `Tools > Options` settings should be respected | | | |
| | :fast_forward: **Automatic Brace Completion** (*C# only*) <br />- Auto-insert close brace<br />- Shift+Enter commit of IntelliSense and any pending brace completion sessions (Currently C# only: https://github.com/dotnet/roslyn/issues/18065) | | | N/A |
| | :fast_forward: **Automatic Brace Completion** (*C# only*) <br />- Auto-insert close brace<br />- Shift+Enter commit of IntelliSense and any pending brace completion sessions | | | N/A |
| | :fast_forward: **Indentation** <br />- Typing `Enter` in an unfinished statement indents the next line | | | |
| **Navigating** | :mag: :fast_forward: **Go To Definition** <br />- F12 from callsites to definition<br />- Ctrl+click [Visual Studio 2017 version 15.4] | | | |
| | :fast_forward: **Go To Implementation** <br />- Ctrl+F12 to jump from virtual members to their implementations<br />- Jump from inheritable types to their implementations | | | N/A |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.IntegrationTest.Utilities;
using Microsoft.VisualStudio.IntegrationTest.Utilities.Input;
using Microsoft.VisualStudio.IntegrationTest.Utilities.OutOfProcess;
using Roslyn.Test.Utilities;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -76,7 +77,7 @@ public int Method()

MarkupTestFile.GetSpans(expectedMarkup, out var expectedText, out ImmutableArray<TextSpan> spans);
VisualStudio.Editor.Verify.TextContains(expectedText);
AssertEx.SetEqual(spans, VisualStudio.Editor.GetTagSpans(VisualStudio.InlineRenameDialog.ValidRenameTag));
AssertEx.SetEqual(spans, VisualStudio.Editor.GetTagSpans(InlineRenameDialog_OutOfProc.ValidRenameTag));

VisualStudio.Editor.SendKeys("SayHello", VirtualKey.Enter);
VisualStudio.Editor.Verify.TextContains(@"private static void SayHello()
Expand Down Expand Up @@ -116,7 +117,7 @@ public int Method()

MarkupTestFile.GetSpans(expectedMarkup, out var expectedText, out ImmutableArray<TextSpan> spans);
Assert.Equal(expectedText, VisualStudio.Editor.GetText());
AssertEx.SetEqual(spans, VisualStudio.Editor.GetTagSpans(VisualStudio.InlineRenameDialog.ValidRenameTag));
AssertEx.SetEqual(spans, VisualStudio.Editor.GetTagSpans(InlineRenameDialog_OutOfProc.ValidRenameTag));

VisualStudio.Editor.SendKeys("SayHello", VirtualKey.Enter);
VisualStudio.Editor.Verify.TextContains(@"private static int SayHello(int a, int b)
Expand Down Expand Up @@ -157,7 +158,7 @@ public int Method()

MarkupTestFile.GetSpans(expectedMarkup, out var expectedText, out ImmutableArray<TextSpan> spans);
Assert.Equal(expectedText, VisualStudio.Editor.GetText());
AssertEx.SetEqual(spans, VisualStudio.Editor.GetTagSpans(VisualStudio.InlineRenameDialog.ValidRenameTag));
AssertEx.SetEqual(spans, VisualStudio.Editor.GetTagSpans(InlineRenameDialog_OutOfProc.ValidRenameTag));
}
}
}
Loading

0 comments on commit ab0f5dd

Please sign in to comment.