This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +418
-352
lines changed
src/Microsoft.CSharp/tests Expand file tree Collapse file tree 3 files changed +418
-352
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . IO ;
3+
4+ namespace Microsoft . CSharp . RuntimeBinder . Tests
5+ {
6+ public static class Helpers
7+ {
8+ public static void OverrideConsoleAndRun ( Action < StringWriter > command )
9+ {
10+ TextWriter savedOut = Console . Out ;
11+ try
12+ {
13+ using ( var stringWriter = new StringWriter ( ) )
14+ {
15+ Console . SetOut ( stringWriter ) ;
16+ command ( stringWriter ) ;
17+ }
18+ }
19+ finally
20+ {
21+ Console . SetOut ( savedOut ) ;
22+ }
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 1616 <Compile Include =" BindingErrors.cs" />
1717 <Compile Include =" EnumUnaryOperationTests.cs" />
1818 <Compile Include =" ExplicitConversionTests.cs" />
19+ <Compile Include =" Helpers.cs" />
1920 <Compile Include =" ImplicitConversionTests.cs" />
2021 <Compile Include =" CSharpArgumentInfoTests.cs" />
2122 <Compile Include =" DefaultParameterTests.cs" />
3637 <ItemGroup Condition =" '$(TargetGroup)' == 'netcoreapp'" >
3738 <Compile Include =" AccessTests.netcoreapp.cs" />
3839 </ItemGroup >
40+ <ItemGroup >
41+ <Service Include =" {82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
42+ </ItemGroup >
3943 <Import Project =" $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
40- </Project >
44+ </Project >
You can’t perform that action at this time.
0 commit comments