Skip to content
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 @@ -183,7 +183,6 @@ public static IEnumerable<object[]> IndexOf_U_WithDiaeresis_TestData()
[MemberData(nameof(IndexOf_TestData))]
[MemberData(nameof(IndexOf_Aesc_Ligature_TestData))]
[MemberData(nameof(IndexOf_U_WithDiaeresis_TestData))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/74179", TestRuntimes.Mono)]
public void IndexOf_String(CompareInfo compareInfo, string source, string value, int startIndex, int count, CompareOptions options, int expected, int expectedMatchLength)
{
if (value.Length == 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ private static StringComparison GetStringComparison(CompareOptions options)

[ConditionalTheory(nameof(PredefinedCulturesOnlyIsDisabled))]
[MemberData(nameof(IndexOf_TestData))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/74179", TestRuntimes.Mono)]
public void TestIndexOf(string source, string value, int startIndex, int count, CompareOptions options, int result)
{
foreach (string cul in s_cultureNames)
Expand Down Expand Up @@ -912,7 +911,6 @@ static void TestCore(CompareInfo compareInfo, string source, string value, int s

[ConditionalTheory(nameof(PredefinedCulturesOnlyIsDisabled))]
[MemberData(nameof(LastIndexOf_TestData))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/74179", TestRuntimes.Mono)]
public void TestLastIndexOf(string source, string value, int startIndex, int count, CompareOptions options, int result)
{
foreach (string cul in s_cultureNames)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ private static int IndexOfValueType<TValue, TNegator>(ref TValue searchSpace, TV
{
length -= 1;

if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset).Equals(value))) return (int)offset;
if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value)) return (int)offset;

offset += 1;
}
Expand Down Expand Up @@ -2145,7 +2145,7 @@ private static int LastIndexOfValueType<TValue, TNegator>(ref TValue searchSpace
{
length -= 1;

if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset).Equals(value))) return (int)offset;
if (TNegator.NegateIfNeeded(Unsafe.Add(ref searchSpace, offset) == value)) return (int)offset;

offset -= 1;
}
Expand Down