Skip to content

Commit

Permalink
Fix tests for Windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 11, 2020
1 parent 0137ffd commit b909a1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/driver/glfw/canvas_test.go
Expand Up @@ -365,7 +365,7 @@ func Test_glCanvas_ContentChangeWithoutMinSizeChangeDoesNotLayout(t *testing.T)
func Test_glCanvas_InsufficientSizeDoesntTriggerResizeIfSizeIsAlreadyMaxedOut(t *testing.T) {
w := createWindow("Test").(*window)
c := w.Canvas().(*glCanvas)
w.Resize(fyne.NewSize(100, 100))
w.Resize(fyne.NewSize(200, 100))
popUpContent := canvas.NewRectangle(color.Black)
popUpContent.SetMinSize(fyne.NewSize(1000, 10))
popUp := widget.NewPopUp(popUpContent, c)
Expand All @@ -376,12 +376,12 @@ func Test_glCanvas_InsufficientSizeDoesntTriggerResizeIfSizeIsAlreadyMaxedOut(t

assert.Equal(t, fyne.NewSize(1000, 10), popUpContent.Size())
assert.Equal(t, fyne.NewSize(1000, 10).Add(fyne.NewSize(theme.Padding()*2, theme.Padding()*2)), popUp.MinSize())
assert.Equal(t, fyne.NewSize(100, 100), popUp.Size())
assert.Equal(t, fyne.NewSize(200, 100), popUp.Size())

repaintWindow(w)

assert.Equal(t, fyne.NewSize(1000, 10), popUpContent.Size())
assert.Equal(t, fyne.NewSize(100, 100), popUp.Size())
assert.Equal(t, fyne.NewSize(200, 100), popUp.Size())
}

func Test_glCanvas_walkTree(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/glfw/file_test.go
Expand Up @@ -31,9 +31,9 @@ func TestGLDriver_FileReaderForURI_Again(t *testing.T) { // a bug blanked files

func TestGLDriver_FileWriterForURI(t *testing.T) {
uri, path := testURI("text2.txt")
defer os.Remove(path)
write, err := NewGLDriver().FileWriterForURI(uri)
defer write.Close()
defer os.Remove(path)

assert.Nil(t, err)
assert.Equal(t, uri, write.URI())
Expand Down

0 comments on commit b909a1a

Please sign in to comment.