Skip to content

Commit

Permalink
Fix build break
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Mar 5, 2024
1 parent 68f7885 commit cc24ab1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public static byte[] ReaderLoop(int inpuDataLength, out int length, ref Utf8Json
ReadOnlySpan<byte> 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. ""
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit cc24ab1

Please sign in to comment.