Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Fix Units for Span.Contains (#32362)
Browse files Browse the repository at this point in the history
* Fix typo

* Remove redunant test

* Test cases may generate XUnit name duplicates
  • Loading branch information
grant-d authored and ahsonkhan committed Sep 20, 2018
1 parent 9634c30 commit 5f7e07f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private static string GenerateInputString(char source, int count, char replaceCh
new object[] { "es-ES", "$", "&", CompareOptions.IgnoreSymbols },
new object[] { "", GenerateInputString('A', 10, '5', 5), GenerateInputString('A', 10, '5', 6), CompareOptions.Ordinal },
new object[] { "", GenerateInputString('A', 100, 'X', 70), GenerateInputString('A', 100, 'X', 70), CompareOptions.OrdinalIgnoreCase },
new object[] { "ja-JP", GenerateInputString('A', 100, 'X', 70), GenerateInputString('A', 100, 'x', 70), CompareOptions.OrdinalIgnoreCase },
new object[] { "en-US", GenerateInputString('A', 1000, 'X', 500), GenerateInputString('A', 1000, 'X', 500), CompareOptions.None },
new object[] { "ja-JP", GenerateInputString('A', 100, 'D', 70), GenerateInputString('A', 100, 'd', 70), CompareOptions.OrdinalIgnoreCase },
new object[] { "en-US", GenerateInputString('A', 1000, 'G', 500), GenerateInputString('A', 1000, 'G', 500), CompareOptions.None },
new object[] { "en-US", GenerateInputString('\u3060', 1000, 'x', 500), GenerateInputString('\u3060', 1000, 'x', 10), CompareOptions.None },
new object[] { "es-ES", GenerateInputString('\u3060', 100, '\u3059', 50), GenerateInputString('\u3060', 100, '\u3059', 50), CompareOptions.Ordinal },
new object[] { "tr-TR", GenerateInputString('\u3060', 5000, '\u3059', 2501), GenerateInputString('\u3060', 5000, '\u3059', 2500), CompareOptions.Ordinal }
Expand Down
5 changes: 2 additions & 3 deletions src/System.Memory/tests/Performance/Perf.Span.Contains.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private static string GenerateInputString(char source, int count, char replaceCh
{
new object[] { "string1", '1' },
new object[] { "foobardzsdzs", 'z' },
new object[] { "StrIng", "I" },
new object[] { "StrIng", 'I' },
new object[] { "\u3060", '\u305F' },
new object[] { "ABCDE", 'c' },
new object[] { "More Test's", '\'' },
Expand All @@ -196,8 +196,7 @@ private static string GenerateInputString(char source, int count, char replaceCh
new object[] { "Hello Worldbbbbbbbbbbbbbbcbbbbbbbbbbbbbbbbbbba!", 'y' },
new object[] { GenerateInputString('A', 10, '5', 5), '5' },
new object[] { GenerateInputString('A', 100, 'X', 70), 'x' },
new object[] { GenerateInputString('A', 100, 'X', 70), 'x' },
new object[] { GenerateInputString('A', 1000, 'X', 500), 'X' },
new object[] { GenerateInputString('A', 1000, 'G', 500), 'G' },
new object[] { GenerateInputString('\u3060', 1000, 'x', 500), 'x' },
new object[] { GenerateInputString('\u3060', 100, '\u3059', 50), '\u3059' }
};
Expand Down
4 changes: 2 additions & 2 deletions src/System.Memory/tests/Performance/Perf.Span.IndexOf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ private static string GenerateInputString(char source, int count, char replaceCh
new object[] { "Hello Worldbbbbbbbbbbbbbbcbbbbbbbbbbbbbbbbbbba!", "y", StringComparison.Ordinal },
new object[] { GenerateInputString('A', 10, '5', 5), "5", StringComparison.InvariantCulture },
new object[] { GenerateInputString('A', 100, 'X', 70), "x", StringComparison.InvariantCultureIgnoreCase },
new object[] { GenerateInputString('A', 100, 'X', 70), "x", StringComparison.OrdinalIgnoreCase },
new object[] { GenerateInputString('A', 1000, 'X', 500), "X", StringComparison.Ordinal },
new object[] { GenerateInputString('A', 100, 'D', 70), "d", StringComparison.OrdinalIgnoreCase },
new object[] { GenerateInputString('A', 1000, 'G', 500), "G", StringComparison.Ordinal },
new object[] { GenerateInputString('\u3060', 1000, 'x', 500), "x", StringComparison.Ordinal },
new object[] { GenerateInputString('\u3060', 100, '\u3059', 50), "\u3059", StringComparison.Ordinal }
};
Expand Down

0 comments on commit 5f7e07f

Please sign in to comment.