From 0cf5216c29e80a7e7d5cc71819938d1bfb632d1f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 26 Aug 2020 03:11:18 +0900 Subject: [PATCH] ebiten: Update tests Updates #1283 --- shader_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shader_test.go b/shader_test.go index bf082b01a..e794c8251 100644 --- a/shader_test.go +++ b/shader_test.go @@ -24,7 +24,7 @@ import ( func TestShaderFill(t *testing.T) { const w, h = 16, 16 - dst, _ := NewImage(8, 8, FilterDefault) + dst, _ := NewImage(w, h, FilterDefault) s, err := NewShader([]byte(`package main func Fragment(position vec4, texCoord vec2, color vec4) vec4 { @@ -35,13 +35,13 @@ func Fragment(position vec4, texCoord vec2, color vec4) vec4 { t.Fatal(err) } - dst.DrawRectShader(16, 16, s, nil) + dst.DrawRectShader(w/2, h/2, s, nil) if got, want := dst.At(0, 0).(color.RGBA), (color.RGBA{0xff, 0, 0, 0xff}); got != want { t.Errorf("got: %v, want: %v", got, want) } - if got, want := dst.At(w-1, h-1).(color.RGBA), (color.RGBA{}); got != want { + if got, want := dst.At(w/2, h/2).(color.RGBA), (color.RGBA{}); got != want { t.Errorf("got: %v, want: %v", got, want) } }