Skip to content

Skip encoding mixing test in fuzzer when SkipValidation=true #111596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void FuzzTarget(ReadOnlySpan<byte> bytes)
}

// Additional test for mixing UTF-8 and UTF-16 encoding. The alignment math is easier in UTF-16 mode so just run it for that.
if (encoding == Utf16EncodingFlag)
if (encoding == Utf16EncodingFlag && !options.SkipValidation)
{
Array.Clear(expectedBuffer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class Utf8JsonWriter
/// Thrown when the specified value is too large.
/// </exception>
/// <exception cref="InvalidOperationException">
/// Thrown if this would result in invalid JSON being written (while validation is enabled) or
/// Thrown when validation is enabled if this would result in invalid JSON being written or
/// if the previously written segment (if any) was not written with this same overload.
/// </exception>
/// <remarks>
Expand Down Expand Up @@ -186,7 +186,7 @@ private void WriteStringSegmentData(ReadOnlySpan<char> escapedValue)
/// Thrown when the specified value is too large.
/// </exception>
/// <exception cref="InvalidOperationException">
/// Thrown if this would result in invalid JSON being written (while validation is enabled) or
/// Thrown when validation is enabled if this would result in invalid JSON being written or
/// if the previously written segment (if any) was not written with this same overload.
/// </exception>
/// <remarks>
Expand Down Expand Up @@ -353,7 +353,7 @@ private void WriteStringSegmentData(ReadOnlySpan<byte> escapedValue)
/// Thrown when the specified value is too large.
/// </exception>
/// <exception cref="InvalidOperationException">
/// Thrown if this would result in invalid JSON being written (while validation is enabled) or
/// Thrown when validation is enabled if this would result in invalid JSON being written or
/// if the previously written segment (if any) was not written with this same overload.
/// </exception>
public void WriteBase64StringSegment(ReadOnlySpan<byte> value, bool isFinalSegment)
Expand Down
Loading