Skip to content

Commit 9a1dcb8

Browse files
committed
debugui: improve test
1 parent 5ca3de1 commit 9a1dcb8

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

id_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ func TestMultipleButtonsOnOneLine(t *testing.T) {
4040
d := debugui.New()
4141
d.Update(func(ctx *debugui.Context) {
4242
ctx.Window("Window", image.Rect(0, 0, 100, 100), func(layout debugui.ContainerLayout) {
43-
idA := ctx.ButtonID("a")
44-
idB := ctx.ButtonID("b")
45-
if idA == idB {
46-
t.Errorf("Button() returned the same value twice: %d", idA)
43+
idA1 := ctx.ButtonID("a")
44+
idA2 := ctx.ButtonID("a")
45+
if idA1 == idA2 {
46+
t.Errorf("Button() returned the same value twice: %d", idA1)
4747
}
48-
idC, idD := ctx.ButtonID("c"), ctx.ButtonID("d")
49-
if idC == idD {
50-
t.Errorf("Button() returned the same value twice: %d", idC)
48+
idB1, idB2 := ctx.ButtonID("b"), ctx.ButtonID("b")
49+
if idB1 == idB2 {
50+
t.Errorf("Button() returned the same value twice: %d", idB1)
5151
}
5252
})
5353
})

0 commit comments

Comments
 (0)