IDE Test Pass for Nullable Reference Types #30226
Labels
Area-IDE
Feature - Nullable Reference Types
Nullable Reference Types
Test
Test failures in roslyn-CI
Milestone
1 Feature updated by compiler team, with appropriate unit tests.
2 Feature requires more complete testing by IDE team.
Product Features
Core Scenarios in Editing, Navigating, and Viewing
To completely enables/disable new compiler features in the compiler & IDE
- Type and paste new constructs
- Nothing interferes with verbatim typing
- Typing new keyword/construct names
- Dotting off of new constructs
- Matching part of the identifier is highlighted (including word prefix matches) [Visual Studio 2015 Update 1]
- Target type preselection [Visual Studio 2017]
IntelliSense filtering [Visual Studio 2017]
- Spacing in and around new constructs
- Spacing options
- Format Document command
Tools > Options
settings should be respected- Auto-insert close brace
- Shift+Enter commit of IntelliSense and any pending brace completion sessions (Known issue: #18065)
- Typing
Enter
in an unfinished statement indents the next line- F12 from callsites to definition
- Ctrl+click [Visual Studio 2017 version 15.4]
- Ctrl+F12 to jump from virtual members to their implementations
- Jump from inheritable types to their implementations
- Lists references to a symbol in "Find Symbol Results" window
- Shows results in hierarchy grouped by definition [Visual Studio 2015]
- Results should be groupable/filterable/classified appropriately [Visual Studio 2017]
- Find All References on literals [Visual Studio 2017 version 15.3]
- Keywords, literals, and identifiers colored appropriately in code
- Colors should theme appropriately
- The "Blue Theme (Additional Contrast)" should have sufficiently dark colors
- Squiggles appear as expected on reasonable spans
Code Transformations
- Dashboard shows correct information
- Highlighted spans are updated appropriately
- Rename operation updates the correct set of symbols
- Updates all direct & cascaded definitions/callsites
- Shows appropriate signature & parameter previews in UI
- Reorder and Remove in the same session [Visual Studio 2015]
- Generated Interface has expected shape
- UI shows appropriate method previews
- Dialog gives all valid options
- Tracking span tracks & dismisses as expected
- Invokable from references [Visual Studio 2015]
- Extracted method has the expected signature
- All arguments/return values handled correctly
- Extracted code block is reasonable
- Automatically starts Inline Rename
- Introduced variable has the expected signature and initializer expression
- "Introduce for All" correctly finds dupes
- Inlined values are appropriately expanded/reduced
- Honors "Place 'System' namespace first" option
Get*
Methods to PropertiesAdd Description
- Select a field and convert it to a property backed by the field
- Try selecting multiple fields at once
ReferenceEquals
tois null
[Visual Studio 2017 version 15.5]- Triggers on appropriate constructs
- Including NuGet references
- Including Referenced Assemblies
- Includes spelling fixes
- Select an expression and introduce a local variable to represent it
- This should start an Inline Rename session
- Select an expression and introduce a field to represent it
- This should start an Inline Rename session
- Call a nonexistent method or constructor to generate it from its usage
- Generated method has the expected signature and accessibility
- Add parameter to existing constructor from callsite [Visual Studio 2017 version 15.3]
- Select fields/properties to generate a constructor accepting corresponding arguments
- Generated constructor has the expected signature and accessibility
- Only missing methods added
- All added methods have the expected signature and accessibility
- Implement IDisposable and you should see a large block of code properly implementing that particular interface
- Inherit from an abstract class, and you should be able to auto-generate all of the missing members
- Name a method
GetStuff
and convert it to a property calledStuff
- Add an
await
to a synchronous method, you should be offered to add the async keyword- Remove all
await
keywords from an async method, you should be offered to remove the async keyword- Create a new instance of a type and then assign each of its properties on subsequent lines
- You should be offered to convert that to an object initializer
- Tab completion, presence in completion list
- Insertion via Snippet Picker UI (Ctrl + K, Ctrl + X) or (Ctrl + K, Ctrl + S)
- (VB) Snippet Picker UI via
?<Tab>
- (VB) Special snippet completion list (
p?<esc><tab>
)- Type "+=" after an event name and QuickInfo shows
- Invoking should pick good name & launch Inline Rename
- Type
Sub Test()
and hit enter, theEnd Sub
should be generated automatically- Type
Sub Test()
andEnd Sub
, changingSub
toFunction
in either one should update the other- Type a name that's close to a variable name but off by a character or two
- Lightbulb should have option to fix up the spelling
- Includes type names that will require a using
- Lightbulb to move type to another file when the type name doesn't match the filename
- Option to change the file name if the type doesn't match the file name
- Offers to change a method named
GetStuff
to a property namedStuff
Use a
switch
on a strict subset of an Enum's members- It should offer to generate the rest of the cases
IDE Features
- Overloads shown with appropriate, colorized signature
- Hover on identifiers
- On completion list items
- Make sure outlining is enabled under options
- Define a method and expect to see a collapsible region around the method definition
- Make sure collapse and expand work
- Highlights matching brace token, if caret is on an open or close brace.
- Hovering on a close brace shows the code around the open brace
- Ensure "Highlight references to symbol under cursor" is enabled in options
- If caret is on an identifier, all references to that identifier in the active document should be highlighted
- We also show related keywords, so placing the caret on a return should show the other returns, if should show elses, try shows catches and finallys, etc.
- Should be able to navigate between highlighted references with Ctrl+Shift+Up/Down
Press Alt + F12 after placing the cursor on a predefined Type or predefined member and expect to see to a temporary window showing the appropriate definition
- Open some existing source files, make sure you can navigate around the file choosing classes or methods.
- Switch between project contexts
- In VB, the NavBar can do code generation for events and for New/Finalize methods
- Press F12 on a predefined type and expect the cursor to move the predefined type definition inside a Metadata-As-Source Generated document.
- Expect to see the xml doc comments collapsed above the method.
- Set the option at
Tools -> Options -> Text Editor -> C# -> Advanced -> Enable navigation to decompiled sources (experimental)
- F12 on a type defined in metadata
- You should see decompiled method bodies, not just declarations
- Place caret on a user defined Type reference and press "ctrl + ,"
- This should list the User Defined Type in the drop down on the Upper Right corner of the editor and selecting this item will move the cursor to the User Reference Definition
- Filters per kind of symbol [Visual Studio 2017]
- Results should be sorted as follows: [Visual Studio 2017 version 15.6 Preview 4]
Expand for details
TODO-
Edit.NextMethod
andEdit.PreviousMethod
should work- You may need to set up keyboard bindings for these commands under
Tools > Options > Environment > Keyboard
- Define a Type and some members in a sample Document.
- Expand the Document listed in the Solution Explorer window and expect to see the Type and Members defined
- Right-click types and try Base Types / Derived Types / Is Used By / Implements
- Right-click methods and try Calls / Is Called By / Is Used By / Implements
- Place the caret over a method, right click & select View Hierarchy
- This should open the "Call Hierarchy window" listing the methods that call the original method and also the callsites within each calling method.
- Make sure Code Lens is enabled from the options. Look for an adornment on top of each method declaration with lists the number of references for that method, last time someone modified the method, who modified the method and other information
- Open/close a project
- Add/remove references
- Unload/reload projects
- Source Control integration (adding references checks out projects, etc.)
- Hit a breakpoint (or step) and verify that there's IntelliSense in the Immediate Window (C#, VB)
- Type an expression, and hit enter. Verify it's evaluated. Type another expression. IntelliSense should still work.
- (VB) there should be IntelliSense if you type "?" followed by an expression (eg, the text of the line in the window is "?foo")
- Hit a breakpoint (or step) and verify that there's IntelliSense in the Watch Window
- Hit a breakpoint (or step) and verify that there's IntelliSense in the Quick Watch Window
- Verify intellisense in the Conditional Breakpoint view
- Verify each of the above scenarios after hitting f5 and hitting another breakpoint, and after stepping
- The span highlighted when a breakpoint is set should be logical
- Right click a file in Solution Explorer & choose View Class Diagram.
- This shows the "Class Details" window where you can add/remove members, change their type/accessibility/name, parameter info, etc.
- Open object browser and classview and verify that project contents are represented live.
- Should be able to invoke find all references, navigate to the definition, and do searches.
- Should work with
Ctrl+.
and the right-click menu- Should include a diff view
- Should include options to fix all in Document/Project/Solution, and to Preview Changes
Varying icons for lightbulb items [Visual Studio 2017 version 15.4]
- Turn the option on under
Tools > Options
- Ensure there's a line between methods.
- Vertical dotted lines appear between braces for declaration-level things
- Hovering on the line shows context
Project System & External Integration
(Any changes to the runtime will require much more testing in this category)
All feature descriptions and testing suggestions are merely examples. Each language feature should be carefully considered independently against each IDE feature to find interesting intersections
- Verify expression and block contexts
- Test on projection boundaries
- Emphasis on rename and formatting
- Verify expression and block contexts
- Test on projection boundaries
- Emphasis on rename and formatting
- Event generation from designer to code
- Designer consumption of new types of members
- Cross language features (Go to definition, find references, rename)
- Create a project, add some controls to the form
- Verify that simple changes to InitializeComponent round-trip to the designer.
- Verify that double clicking a control generates or navigates to an event handler for its default event
- Regular linked files
- Shared Projects
- Multitargeted .NET Core Apps
Interaction with other new language features in the IDE
Verify IDE handling of the new language feature in conjunction with other new/unreleased language features
New Feature Suggestions
What refactorings, fixes, code transformations, or other in-editor experiences would enhance this language feature?
The text was updated successfully, but these errors were encountered: