Skip to content

Commit

Permalink
Fix MA0076
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectron committed Nov 15, 2024
1 parent 3b9569e commit c690d81
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections;
using System.Dynamic;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
Expand Down Expand Up @@ -62,11 +63,11 @@ private static void ValidateArray(Array expected, Array actual, string message,
{
var expectedDimensionLength = expected.GetLength(dimension);
var actualDimensionLength = expected.GetLength(dimension);
Assert.AreEqual(expectedDimensionLength, actualDimensionLength, $"{message} -> dimension {dimension} have different lower bounds");
Assert.AreEqual(expectedDimensionLength, actualDimensionLength, string.Format(CultureInfo.InvariantCulture, "{0} -> dimension {1} have different lower bounds", message, dimension));

var expectedDimensionLowerBound = expected.GetLength(dimension);
var actualDimensionLowerBound = expected.GetLength(dimension);
Assert.AreEqual(expectedDimensionLowerBound, actualDimensionLowerBound, $"{message} -> dimension {dimension} have different lower bounds");
Assert.AreEqual(expectedDimensionLowerBound, actualDimensionLowerBound, string.Format(CultureInfo.InvariantCulture, "{0} -> dimension {1} have different lower bounds", message, dimension));
}

ValidateEnumerable(expected, actual, message, equals);
Expand All @@ -87,7 +88,7 @@ private static void ValidateEnumerable(IEnumerable expected, IEnumerable actual,

var currentExpected = expectedEnumerator.Current;
var currentActual = actualEnumerator.Current;
ValidateObject(currentExpected, currentActual, $"{message}[{index}]", equals);
ValidateObject(currentExpected, currentActual, string.Format(CultureInfo.InvariantCulture, "{0}[{1}]", message, index), equals);
index++;
}

Expand Down

0 comments on commit c690d81

Please sign in to comment.