blob: fb17ef73b7ec34a14c4feb4aa8c15a055957f33e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// 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"
)
// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread
func init() {
go func() {
w := GetNewWindow(Do, "Hello", 320, 240)
b := GetNewButton(Do, "There")
Wait(Do, w.SetControl(b))
done := make(chan struct{})
Wait(Do, w.OnClosing(func(c Doer) bool {
Stop()
done <- struct{}{}
return true
}))
Wait(Do, w.Show())
<-done
}()
err := Go()
if err != nil {
panic(err)
}
}
func TestDummy(t *testing.T) {
// do nothing
}
|