From 1e270e2ff89ef536726c84af016612b99b40b836 Mon Sep 17 00:00:00 2001 From: Jacob Date: Fri, 12 Jan 2024 22:03:58 +0100 Subject: [PATCH] Add tests for negative and floatingpoint --- internal/async/vector_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/async/vector_test.go b/internal/async/vector_test.go index f9b5ca91d1..183bf64ec6 100644 --- a/internal/async/vector_test.go +++ b/internal/async/vector_test.go @@ -38,6 +38,10 @@ func TestSize(t *testing.T) { uneven := fyne.NewSize(125, 600) size.Store(uneven) assert.Equal(t, uneven, size.Load()) + + floats := fyne.NewSize(-22.565, 133.333) + size.Store(floats) + assert.Equal(t, floats, size.Load()) } func TestPosition(t *testing.T) { @@ -51,4 +55,8 @@ func TestPosition(t *testing.T) { uneven := fyne.NewPos(125, 600) pos.Store(uneven) assert.Equal(t, uneven, pos.Load()) + + floats := fyne.NewPos(-22.565, 133.333) + pos.Store(floats) + assert.Equal(t, floats, pos.Load()) }