From e35e6b8e13bf7ae1147989e652d9410e913f88d2 Mon Sep 17 00:00:00 2001 From: sago35 Date: Mon, 10 Nov 2025 19:31:38 +0900 Subject: [PATCH] fix: correct logic error in image size checks in pixel's tests --- pixel/image_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixel/image_test.go b/pixel/image_test.go index 2b804b6..1feef75 100644 --- a/pixel/image_test.go +++ b/pixel/image_test.go @@ -11,7 +11,7 @@ import ( func TestImageRGB565BE(t *testing.T) { image := pixel.NewImage[pixel.RGB565BE](5, 3) - if width, height := image.Size(); width != 5 && height != 3 { + if width, height := image.Size(); width != 5 || height != 3 { t.Errorf("image.Size(): expected 5, 3 but got %d, %d", width, height) } for _, c := range []color.RGBA{ @@ -32,7 +32,7 @@ func TestImageRGB565BE(t *testing.T) { func TestImageRGB444BE(t *testing.T) { image := pixel.NewImage[pixel.RGB444BE](5, 3) - if width, height := image.Size(); width != 5 && height != 3 { + if width, height := image.Size(); width != 5 || height != 3 { t.Errorf("image.Size(): expected 5, 3 but got %d, %d", width, height) } for _, c := range []color.RGBA{