Remove reflection usage from Console tests#73224
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-console Issue DetailsIn #72193 I've moved most of In this PR I remove remaining reflection-based logic. This required referencing few code files, but IMO it's lesser evil compared to relying on reflection which can be easily broken. fixes #73212
|
|
/azp list |
|
@MichalStrehovsky what do I need to do to run NativeAOT tests? |
| <Compile Include="NonStandardConfiguration.Unix.cs" /> | ||
| <Compile Include="TermInfo.Unix.cs" /> | ||
| <Compile Include="..\src\System\TermInfo.cs" Link="src\System\TermInfo.cs" /> | ||
| <Compile Include="..\src\System\TermInfo.DatabaseFactory.cs" Link="src\System\TermInfo.DatabaseFactory.cs" /> |
There was a problem hiding this comment.
FWIW, in other libraries, e.g. all of the System.Net.* libs, System.Text.RegularExpressions, etc., we've split the test projects into FunctionalTests and UnitTests, where the difference is the FunctionalTests are written only in terms of the public surface area exposed by the library under test, and the UnitTests include source from the target library in order to test internals directly.
They're in the runtime-extra-platforms leg. But if there's no more reflection, this should be good! Thank you! |
In #72193 I've moved most of
TermInfo.csto separate files to be able to implement testable key parser without using the reflection.In this PR I remove remaining reflection-based logic. This required referencing few code files, but IMO it's lesser evil compared to relying on reflection which can be easily broken.
fixes #73212