From eef3e1136b51112c23620b150ffcf03caddc0ff9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 14 Oct 2014 15:17:35 -0400 Subject: Started the new recontainerization.. --- newctrl/zz_test.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 newctrl/zz_test.go (limited to 'newctrl/zz_test.go') diff --git a/newctrl/zz_test.go b/newctrl/zz_test.go new file mode 100644 index 0000000..a1537fd --- /dev/null +++ b/newctrl/zz_test.go @@ -0,0 +1,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 +} -- cgit v1.2.3