diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs index 3083d0bed99a0..c9f7ae5011283 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonTestHelper.cs @@ -398,7 +398,7 @@ public static byte[] ReaderLoop(int inpuDataLength, out int length, ref Utf8Json ReadOnlySpan valueSpan = json.HasValueSequence ? json.ValueSequence.ToArray() : json.ValueSpan; if (json.HasValueSequence) { - Assert.True(json.ValueSpan == default); + Assert.True(json.ValueSpan.IsEmpty); if ((tokenType != JsonTokenType.String && tokenType != JsonTokenType.PropertyName) || json.GetString().Length != 0) { // Empty strings could still make this true, i.e. "" @@ -411,7 +411,7 @@ public static byte[] ReaderLoop(int inpuDataLength, out int length, ref Utf8Json if ((tokenType != JsonTokenType.String && tokenType != JsonTokenType.PropertyName) || json.GetString().Length != 0) { // Empty strings could still make this true, i.e. "" - Assert.False(json.ValueSpan == default); + Assert.False(json.ValueSpan.IsEmpty); } } switch (tokenType) diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonReaderTests.MultiSegment.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonReaderTests.MultiSegment.cs index 34b4efec86593..b1060d09f6e78 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonReaderTests.MultiSegment.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonReaderTests.MultiSegment.cs @@ -1089,7 +1089,7 @@ private static void TestReadingJsonWithComments(byte[] inputData, ReadOnlySequen builder.Append(Encoding.UTF8.GetString(json.HasValueSequence ? json.ValueSequence.ToArray() : json.ValueSpan.ToArray())); if (json.HasValueSequence) { - Assert.True(json.ValueSpan == default); + Assert.True(json.ValueSpan.IsEmpty); } else { @@ -1112,7 +1112,7 @@ private static void TestReadingJsonWithComments(byte[] inputData, ReadOnlySequen builder.Append(Encoding.UTF8.GetString(json.HasValueSequence ? json.ValueSequence.ToArray() : json.ValueSpan.ToArray())); if (json.HasValueSequence) { - Assert.True(json.ValueSpan == default); + Assert.True(json.ValueSpan.IsEmpty); } else { @@ -1158,7 +1158,7 @@ private static void TestReadingSingleValueJson(byte[] inputData, ReadOnlySequenc if (json.HasValueSequence) { - Assert.True(json.ValueSpan == default); + Assert.True(json.ValueSpan.IsEmpty); } else {