cmd/gogio: use a more difficult color for end-to-end tests

RGB 0xff0000 is too easy to get right by accident.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-10-30 14:56:37 +01:00
parent d74be30a90
commit dc7af8fba3
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -127,8 +127,8 @@ func TestJSOnChrome(t *testing.T) {
t.Fatalf("expected dimensions to be %d*%d, got %d*%d",
wantSize, wantSize, size.X, size.Y)
}
wantColor(t, img, 5, 5, 0xffff, 0x0, 0x0)
wantColor(t, img, 595, 595, 0xffff, 0x0, 0x0)
wantColor(t, img, 5, 5, 0xdede, 0xadad, 0xbebe)
wantColor(t, img, 595, 595, 0xdede, 0xadad, 0xbebe)
}
func wantColor(t *testing.T, img image.Image, x, y int, r, g, b uint32) {
+1 -1
View File
@@ -25,7 +25,7 @@ func main() {
}
func loop(w *app.Window) error {
background := color.RGBA{255, 0, 0, 255}
background := color.RGBA{R: 0xde, G: 0xad, B: 0xbe, A: 0xff}
ops := new(op.Ops)
for {
e := <-w.Events()
+2 -2
View File
@@ -170,7 +170,7 @@ func TestX11(t *testing.T) {
t.Fatalf("expected dimensions to be %d*%d, got %d*%d",
wantSize, wantSize, size.X, size.Y)
}
wantColor(t, img, 5, 5, 0xffff, 0x0, 0x0)
wantColor(t, img, 595, 595, 0xffff, 0x0, 0x0)
wantColor(t, img, 5, 5, 0xdede, 0xadad, 0xbebe)
wantColor(t, img, 595, 595, 0xdede, 0xadad, 0xbebe)
}
}