-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Test base #19521
Test base #19521
Conversation
@dotnet/roslyn-compiler Please review -- this is test only change. Recommended to review each commit separately. |
@dotnet/roslyn-compiler Anybody else interested in reviewing? |
Starting review. |
private IEnumerable<IModuleSymbol> GetReferencesToModuleSymbols(IEnumerable<MetadataReference> references, MetadataImportOptions importOptions) | ||
{ | ||
var dummy = _compilation | ||
.RemoveAllReferences() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RemoveAllReferences is just the same as WithReferences with some empty array. What is the benefit of calling WithReferences twice?
|
||
namespace Microsoft.CodeAnalysis.Test.Utilities | ||
{ | ||
internal sealed class CompilationDifference | ||
public sealed class CompilationDifference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why public
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for it to be internal. Public is easier as it avoids more internals visible to between test assemblies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks
@jcouv Thanks for review. |
Test only change (refactoring).
Currently many test classes across Roslyn compiles and services derive from TestBase. TestBase has become a kitchen sink of helpers. Some of them make sense for all tests, but a lot of them are specific to compilers and are not relevant to services. This change takes a step at separating compiler specific helpers, such as PDB validation to a separate class and project -- Roslyn.Test.PdbUtilities. Long term we could move more IL and metadata validation to this project and rename it to CompilerTestUtilities.