From be86450ea524489563f04a3e3c2b203a25f0126b Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 12 Oct 2023 17:22:55 -0500 Subject: [PATCH] widget/material: drop test dependency on package app Without the dependency, tests builds much faster. Signed-off-by: Elias Naur --- widget/material/list_test.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/widget/material/list_test.go b/widget/material/list_test.go index 9ac1019a..269f7c3d 100644 --- a/widget/material/list_test.go +++ b/widget/material/list_test.go @@ -3,9 +3,7 @@ package material_test import ( "image" "testing" - "time" - "gioui.org/app" "gioui.org/layout" "gioui.org/op" "gioui.org/unit" @@ -14,18 +12,17 @@ import ( ) func TestListAnchorStrategies(t *testing.T) { - var ops op.Ops - gtx := app.NewContext(&ops, app.FrameEvent{ + gtx := layout.Context{ + Ops: new(op.Ops), Metric: unit.Metric{ PxPerDp: 1, PxPerSp: 1, }, - Now: time.Now(), - Size: image.Point{ + Constraints: layout.Exact(image.Point{ X: 500, Y: 500, - }, - }) + }), + } gtx.Constraints.Min = image.Point{} var spaceConstraints layout.Constraints