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

This commit is contained in:
sago35
2025-11-10 19:31:38 +09:00
committed by Ron Evans
parent 408851a9f5
commit e35e6b8e13
+2 -2
View File
@@ -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{