mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
widget/material: drop test dependency on package app
Without the dependency, tests builds much faster. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -3,9 +3,7 @@ package material_test
|
|||||||
import (
|
import (
|
||||||
"image"
|
"image"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
|
||||||
|
|
||||||
"gioui.org/app"
|
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
"gioui.org/op"
|
"gioui.org/op"
|
||||||
"gioui.org/unit"
|
"gioui.org/unit"
|
||||||
@@ -14,18 +12,17 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestListAnchorStrategies(t *testing.T) {
|
func TestListAnchorStrategies(t *testing.T) {
|
||||||
var ops op.Ops
|
gtx := layout.Context{
|
||||||
gtx := app.NewContext(&ops, app.FrameEvent{
|
Ops: new(op.Ops),
|
||||||
Metric: unit.Metric{
|
Metric: unit.Metric{
|
||||||
PxPerDp: 1,
|
PxPerDp: 1,
|
||||||
PxPerSp: 1,
|
PxPerSp: 1,
|
||||||
},
|
},
|
||||||
Now: time.Now(),
|
Constraints: layout.Exact(image.Point{
|
||||||
Size: image.Point{
|
|
||||||
X: 500,
|
X: 500,
|
||||||
Y: 500,
|
Y: 500,
|
||||||
},
|
}),
|
||||||
})
|
}
|
||||||
gtx.Constraints.Min = image.Point{}
|
gtx.Constraints.Min = image.Point{}
|
||||||
|
|
||||||
var spaceConstraints layout.Constraints
|
var spaceConstraints layout.Constraints
|
||||||
|
|||||||
Reference in New Issue
Block a user