diff --git a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs index 5462b2da6fb0d..012a03bcad1c1 100644 --- a/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs +++ b/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs @@ -124,7 +124,7 @@ public void Test_GenerateManifest_InvalidEventSources() e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.EnumKindMismatchEventSource), string.Empty, strictOptions)); AsserExceptionStringsEqual(() => string.Join(Environment.NewLine, - GetResourceString("EventSource_EnumKindMismatch", "Op1", "EventKeywords"), + GetResourceString("EventSource_EnumKindMismatch", "EventKeywords", "Opcodes"), GetResourceString("EventSource_UndefinedKeyword", "0x1", "WriteInteger")), e); diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs index b2d00363146ee..0c6b5da5fafbd 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs @@ -153,7 +153,7 @@ public IList>? BufferList if (!_buffer.Equals(default)) { // Can't have both set - throw new ArgumentException(SR.net_ambiguousbuffers, nameof(_buffer)); + throw new ArgumentException(SR.net_ambiguousbuffers); } // Copy the user-provided list into our internal buffer list, @@ -358,7 +358,7 @@ public void SetBuffer(byte[]? buffer, int offset, int count) // Can't have both Buffer and BufferList. if (_bufferList != null) { - throw new ArgumentException(SR.net_ambiguousbuffers, nameof(_bufferList)); + throw new ArgumentException(SR.net_ambiguousbuffers); } // Offset and count can't be negative and the @@ -391,7 +391,7 @@ public void SetBuffer(Memory buffer) { if (buffer.Length != 0 && _bufferList != null) { - throw new ArgumentException(SR.net_ambiguousbuffers, nameof(_bufferList)); + throw new ArgumentException(SR.net_ambiguousbuffers); } _buffer = buffer; diff --git a/src/libraries/System.Text.Encoding/tests/Fallback/DecoderReplacementFallbackTests.cs b/src/libraries/System.Text.Encoding/tests/Fallback/DecoderReplacementFallbackTests.cs index 51d3f2d074e72..7bb51d8a22dd8 100644 --- a/src/libraries/System.Text.Encoding/tests/Fallback/DecoderReplacementFallbackTests.cs +++ b/src/libraries/System.Text.Encoding/tests/Fallback/DecoderReplacementFallbackTests.cs @@ -36,12 +36,12 @@ public void Ctor_Invalid() AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback(null)); // Invalid surrogate pair - AssertExtensions.Throws(null, () => new DecoderReplacementFallback("\uD800")); - AssertExtensions.Throws(null, () => new DecoderReplacementFallback("\uD800a")); - AssertExtensions.Throws(null, () => new DecoderReplacementFallback("\uDC00")); - AssertExtensions.Throws(null, () => new DecoderReplacementFallback("a\uDC00")); - AssertExtensions.Throws(null, () => new DecoderReplacementFallback("\uDC00\uDC00")); - AssertExtensions.Throws(null, () => new DecoderReplacementFallback("\uD800\uD800")); + AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback("\uD800")); + AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback("\uD800a")); + AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback("\uDC00")); + AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback("a\uDC00")); + AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback("\uDC00\uDC00")); + AssertExtensions.Throws("replacement", () => new DecoderReplacementFallback("\uD800\uD800")); } public static IEnumerable Equals_TestData() diff --git a/src/libraries/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs b/src/libraries/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs index 45709bb693e22..1fe7b2499ab16 100644 --- a/src/libraries/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs +++ b/src/libraries/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs @@ -36,12 +36,12 @@ public void Ctor_Invalid() AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback(null)); // Invalid surrogate pair - AssertExtensions.Throws(null, () => new EncoderReplacementFallback("\uD800")); - AssertExtensions.Throws(null, () => new EncoderReplacementFallback("\uD800a")); - AssertExtensions.Throws(null, () => new EncoderReplacementFallback("\uDC00")); - AssertExtensions.Throws(null, () => new EncoderReplacementFallback("a\uDC00")); - AssertExtensions.Throws(null, () => new EncoderReplacementFallback("\uDC00\uDC00")); - AssertExtensions.Throws(null, () => new EncoderReplacementFallback("\uD800\uD800")); + AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback("\uD800")); + AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback("\uD800a")); + AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback("\uDC00")); + AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback("a\uDC00")); + AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback("\uDC00\uDC00")); + AssertExtensions.Throws("replacement", () => new EncoderReplacementFallback("\uD800\uD800")); } public static IEnumerable Equals_TestData()