Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
Add one more pixel to output test.
  • Loading branch information
juliusfriedman committed Oct 19, 2024
1 parent 16218ae commit c2488cd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Codecs/Image/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,9 @@ public void Test_PixAt_ValidCoordinates_ReturnsCorrectData()
System.Diagnostics.Debug.Assert(pixelData != null);
System.Diagnostics.Debug.Assert(imageFormat.Length == pixelData.Count);

foreach (var component in image[101, 101])
component.Fill(byte.MaxValue);

// Save
var currentPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

Expand All @@ -1405,13 +1408,13 @@ public void Test_PixAt_InvalidCoordinates_ThrowsException()
var image = new Image(imageFormat, width, height);

// Act & Assert
try { image.PixAt(-1, 100, 0); }
try { image.GetPixelDataAt(-1, 100, 0); }
catch (ArgumentOutOfRangeException) { }
try { image.PixAt(100, -1, 0); }
try { image.GetPixelDataAt(100, -1, 0); }
catch (ArgumentOutOfRangeException) { }
try { image.PixAt(1920, 100, 0); }
try { image.GetPixelDataAt(1920, 100, 0); }
catch (ArgumentOutOfRangeException) { }
try { image.PixAt(100, 1080, 0); }
try { image.GetPixelDataAt(100, 1080, 0); }
catch (ArgumentOutOfRangeException) { }
}
}
Expand Down

0 comments on commit c2488cd

Please sign in to comment.