You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,10 @@ var symbolInfo = semanticModel.GetSymbolInfo(expression);
54
54
- Test utilities in `Microsoft.CodeAnalysis.Test.Utilities`
55
55
- Language-specific test bases: `CSharpTestBase`, `VisualBasicTestBase`
56
56
- Add `[WorkItem("https://github.com/dotnet/roslyn/issues/issueNumber")]` attribute to tests that fix specific GitHub issues
57
+
- Prefer raw string literals (`"""..."""`) over verbatim strings (`@"..."`) when creating test source code
58
+
- Avoid unnecessary intermediary assertions - tests should do the minimal amount of work to validate just the core issue being addressed
59
+
- In tests, use concise methods like `.Single()` instead of asserting count and extracting elements
60
+
- For compiler tests, validate diagnostics (e.g., `comp.VerifyEmitDiagnostics()`) so reviewers can easily see if the code is in error or represents something legal
0 commit comments