mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
all: replace InvalidateOp with InvalidateCmd command
Curiously, InvalidateCmd is probably the only command that is appropriate to call during layout. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/op"
|
||||
)
|
||||
|
||||
func TestNoFilterAllocs(t *testing.T) {
|
||||
@@ -22,3 +23,12 @@ func TestNoFilterAllocs(t *testing.T) {
|
||||
t.Fatalf("expected 0 AllocsPerOp, got %d", allocs)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRouterWakeup(t *testing.T) {
|
||||
r := new(Router)
|
||||
r.Source().Execute(op.InvalidateCmd{})
|
||||
r.Frame(new(op.Ops))
|
||||
if _, wake := r.WakeupTime(); !wake {
|
||||
t.Errorf("InvalidateCmd did not trigger a redraw")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user