Skip to content

Commit

Permalink
Fixup deprecated test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbabcock committed Aug 24, 2024
1 parent 5ba6ee1 commit bfecf40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Pfim.Tests/TargaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ public void ParseTargaTopLeft()
seenBlue |= image.Data[i] == 12 && image.Data[i + 1] == 0 && image.Data[i + 2] == 255;
if (image.Data[i] == 255 && image.Data[i + 1] == 4 && image.Data[i + 2] == 4 && !seenBlue)
{
Assert.True(false, "Expected to see blue before red (this could mean that the color channels are swapped)");
Assert.Fail("Expected to see blue before red (this could mean that the color channels are swapped)");
}

if (!((image.Data[i] == 0 && image.Data[i + 1] == 255 && image.Data[i + 2] == 0) ||
(image.Data[i] == 255 && image.Data[i + 1] == 0 && image.Data[i + 2] == 12) ||
(image.Data[i] == 255 && image.Data[i + 1] == 255 && image.Data[i + 2] == 255) ||
(image.Data[i + 2] == 255 && image.Data[i + 1] == image.Data[i])))
{
Assert.True(false, $"Did not expect pixel {image.Data[i]} {image.Data[i + 1]} {image.Data[i + 2]}");
Assert.Fail($"Did not expect pixel {image.Data[i]} {image.Data[i + 1]} {image.Data[i + 2]}");
}
}
}
Expand Down

0 comments on commit bfecf40

Please sign in to comment.