Skip to content

Commit

Permalink
Add tests for negative and floatingpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jan 12, 2024
1 parent d04d5e5 commit 1e270e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/async/vector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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())
}

0 comments on commit 1e270e2

Please sign in to comment.