Skip to content

Commit 918b0f5

Browse files
committed
Test fixes
1 parent 37ea41d commit 918b0f5

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

src/libraries/System.Console/tests/ReadAndWrite.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ public static async Task OutWriteAndWriteLineOverloads()
158158
Console.SetOut(sw);
159159
TextWriter writer = Console.Out;
160160
Assert.NotNull(writer);
161-
Assert.NotEqual(writer, sw); // the writer we provide gets wrapped
161+
// Browser bypasses SyncTextWriter for faster startup
162+
if (!OperatingSystem.IsBrowser())
163+
Assert.NotEqual(writer, sw); // the writer we provide gets wrapped
162164

163165
// We just want to ensure none of these throw exceptions, we don't actually validate
164166
// what was written.

src/libraries/System.Runtime/tests/System.IO.Tests/StreamReader/StreamReader.cs

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public void ObjectClosedReadLineBaseStream()
3030
}
3131

3232
[Fact]
33+
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
3334
public void Synchronized_NewObject()
3435
{
3536
using (Stream str = GetLargeStream())

src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.cs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace System.IO.Tests
88
public partial class WriteTests
99
{
1010
[Fact]
11+
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
1112
public void Synchronized_NewObject()
1213
{
1314
using (Stream str = CreateStream())

src/libraries/System.Runtime/tests/System.IO.Tests/TextWriter/TextWriterTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ public void DisposeAsync_ExceptionReturnedInTask()
691691
}
692692

693693
[Fact]
694+
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
694695
public async Task FlushAsync_Precanceled()
695696
{
696697
Assert.Equal(TaskStatus.RanToCompletion, TextWriter.Null.FlushAsync(new CancellationToken(true)).Status);

0 commit comments

Comments
 (0)