2014-07-08 09:00:16 -05:00
|
|
|
// 8 july 2014
|
|
|
|
|
|
|
|
package ui
|
|
|
|
|
|
|
|
// This file is called zz_test.go to keep it separate from the other files in this package (and because go test won't accept just test.go)
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2014-07-08 15:47:28 -05:00
|
|
|
// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread
|
|
|
|
func init() {
|
2014-07-08 09:00:16 -05:00
|
|
|
go func() {
|
|
|
|
w := GetNewWindow(Do, "Hello", 320, 240)
|
2014-07-15 19:48:16 -05:00
|
|
|
b := GetNewButton(Do, "There")
|
|
|
|
Wait(Do, w.SetControl(b))
|
2014-07-08 09:00:16 -05:00
|
|
|
done := make(chan struct{})
|
2014-07-13 00:14:55 -05:00
|
|
|
Wait(Do, w.OnClosing(func(c Doer) bool {
|
2014-07-13 19:26:16 -05:00
|
|
|
Stop()
|
2014-07-08 11:04:51 -05:00
|
|
|
done <- struct{}{}
|
|
|
|
return true
|
|
|
|
}))
|
2014-07-08 09:00:16 -05:00
|
|
|
Wait(Do, w.Show())
|
|
|
|
<-done
|
|
|
|
}()
|
|
|
|
err := Go()
|
|
|
|
if err != nil {
|
2014-07-08 15:47:28 -05:00
|
|
|
panic(err)
|
2014-07-08 09:00:16 -05:00
|
|
|
}
|
|
|
|
}
|
2014-07-08 15:47:28 -05:00
|
|
|
|
|
|
|
func TestDummy(t *testing.T) {
|
|
|
|
// do nothing
|
|
|
|
}
|