Skip to content

Commit

Permalink
removed redunant character assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
alanisaac committed Mar 3, 2020
1 parent 8c893c0 commit d09874d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libraries/System.Text.Json/tests/JsonBase64TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private static string GenerateRandomValidLargeString()
var random = new Random(42);
var charArray = new char[502];
charArray[0] = '"';
for (int i = 1; i < charArray.Length; i++)
for (int i = 1; i < charArray.Length - 1; i++)
{
charArray[i] = (char)random.Next('A', 'Z'); // ASCII values (between 65 and 90) that constitute valid base 64 string.
}
Expand All @@ -46,7 +46,7 @@ private static string GenerateRandomInvalidLargeString(bool includeEscapedCharac
var random = new Random(42);
var charArray = new char[500];
charArray[0] = '"';
for (int i = 1; i < charArray.Length; i++)
for (int i = 1; i < charArray.Length - 1; i++)
{
charArray[i] = (char)random.Next('?', '\\'); // ASCII values (between 63 and 91) that don't need to be escaped.
}
Expand Down

0 comments on commit d09874d

Please sign in to comment.