summaryrefslogtreecommitdiff
path: root/newctrl/zz_test.go
blob: a1537fde3f2ee66d3aa1588fabfd29bfc7441026 (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
35
36
// 14 october 2014

package ui

import "flag"
import "testing"

var twindow *window

func maketw(done chan struct{}) {
	button := newButton("Greet")
	twindow = newWindow("Hello", 200, 100, button)
	twindow.OnClosing(func() bool {
		Stop()
		return true
	})
	twindow.Show()
}

// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread
func init() {
	flag.Parse()
	go func() {
		done := make(chan struct{})
		Do(func() { maketw(done) })
		<-done
	}()
	err := Go()
	if err != nil {
		panic(err)
	}
}

func TestDummy(t *testing.T) {
	// do nothing
}