Files
soft_quay/app-modern/ui/gio/shell_test.go
T

26 lines
509 B
Go

package gio
import (
"image"
"testing"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/unit"
)
func TestAppShellFillsWindow(t *testing.T) {
var operations op.Ops
size := image.Pt(1080, 720)
context := layout.Context{
Ops: &operations,
Metric: unit.Metric{PxPerDp: 1, PxPerSp: 1},
Constraints: layout.Exact(size),
}
dimensions := NewAppShell("Modern").Layout(context, NewTheme())
if dimensions.Size != size {
t.Fatalf("Layout() size = %v, want %v", dimensions.Size, size)
}
}