var input = new char[9][] {new char[9]...}
var expected = new char[27][] {new char[9]...}
var result = SudokuLibrary.BoardOrganizer.BoardOrganizerSolution(input);
I don't understand why the test fails when I test it with
CollectionAssert.AreEqual(expected, result);
But doesn't fail when I loop through the jagged arrays to compare each element.
var test = true;
for(int i = 0; i < 27; i++)
{
for(int j = 0; j < 9; j++)
{
if (result[i][j] != expected[i][j])
test = false;
}
}
Assert.AreEqual(true, test);
There information about this online, but I don't understand it well. If every character in both jagged arrays are the same and in the same order, why does CollectionsAssert.AreEqual say that the jagged arrays aren't equal?