2015-12-11 21:58:21 -06:00
|
|
|
// 11 december 2015
|
|
|
|
|
|
|
|
package ui
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestIt(t *testing.T) {
|
|
|
|
err := Main(func() {
|
2015-12-12 12:37:36 -06:00
|
|
|
w := NewWindow("Hello", 320, 240, false)
|
|
|
|
w.OnClosing(func(w *Window) bool {
|
|
|
|
Quit()
|
|
|
|
return true
|
|
|
|
})
|
2015-12-12 15:59:57 -06:00
|
|
|
l := NewLabel("A Label")
|
|
|
|
w.SetChild(l)
|
2015-12-12 12:37:36 -06:00
|
|
|
w.Show()
|
2015-12-11 21:58:21 -06:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|