diff --git a/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.CtorTests.cs b/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.CtorTests.cs index bf768cf9ff725b..ec8c9ed099e455 100644 --- a/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.CtorTests.cs +++ b/src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.CtorTests.cs @@ -48,7 +48,13 @@ public static void UnicodeEncoding() TestEncoding(System.Text.Encoding.Unicode, "This is Unicode\u00FF"); } - private static void TestEncoding(System.Text.Encoding encoding, string testString) + [Fact] + public static void UTF8Encoding() + { + TestEncoding(null, "This is UTF8\u00FF"); + } + + private static void TestEncoding(System.Text.Encoding? encoding, string testString) { StreamWriter sw2; StreamReader sr2;