fix: correct logic error in image size checks in pixel's tests (Monochrome)

This commit is contained in:
sago35
2025-11-10 19:47:15 +09:00
committed by Ron Evans
parent 027c91272e
commit 744fda5eec
+1 -1
View File
@@ -109,7 +109,7 @@ func TestImageRGB444BE(t *testing.T) {
func TestImageMonochrome(t *testing.T) { func TestImageMonochrome(t *testing.T) {
image := pixel.NewImage[pixel.Monochrome](128, 64) image := pixel.NewImage[pixel.Monochrome](128, 64)
if width, height := image.Size(); width != 128 && height != 64 { if width, height := image.Size(); width != 128 || height != 64 {
t.Errorf("image.Size(): expected 128, 64 but got %d, %d", width, height) t.Errorf("image.Size(): expected 128, 64 but got %d, %d", width, height)
} }
for _, expected := range []color.RGBA{ for _, expected := range []color.RGBA{