Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Apr 24, 2024
1 parent 37ea41d commit 918b0f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libraries/System.Console/tests/ReadAndWrite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ public static async Task OutWriteAndWriteLineOverloads()
Console.SetOut(sw);
TextWriter writer = Console.Out;
Assert.NotNull(writer);
Assert.NotEqual(writer, sw); // the writer we provide gets wrapped
// Browser bypasses SyncTextWriter for faster startup
if (!OperatingSystem.IsBrowser())
Assert.NotEqual(writer, sw); // the writer we provide gets wrapped

// We just want to ensure none of these throw exceptions, we don't actually validate
// what was written.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public void ObjectClosedReadLineBaseStream()
}

[Fact]
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
public void Synchronized_NewObject()
{
using (Stream str = GetLargeStream())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.IO.Tests
public partial class WriteTests
{
[Fact]
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
public void Synchronized_NewObject()
{
using (Stream str = CreateStream())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ public void DisposeAsync_ExceptionReturnedInTask()
}

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

0 comments on commit 918b0f5

Please sign in to comment.