summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-19 09:58:57 -0400
committerPietro Gagliardi <[email protected]>2014-07-19 09:58:57 -0400
commit32061353a10a88503592355b3df549267ec82ae5 (patch)
tree553e8b30ae9bed87b0863b94635b5c034fa909d0
parent104337188f1d7bcdb0774748f41cb91a06216122 (diff)
Updated the test program to be Request-less. Now to test...
-rw-r--r--redo/zz_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 8b87312..50a4aee 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -14,15 +14,15 @@ var closeOnClick = flag.Bool("close", false, "close on click")
// 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() {
- w := GetNewWindow(Do, "Hello", 320, 240)
- b := GetNewButton(Do, "There")
- Wait(Do, w.SetControl(b))
+ go Do(func() {
+ w := NewWindow(Do, "Hello", 320, 240)
+ b := NewButton(Do, "There")
+ w.SetControl(b)
if *closeOnClick {
- Wait(Do, b.SetText("Click to Close"))
+ b.SetText("Click to Close")
}
done := make(chan struct{})
- Wait(Do, w.OnClosing(func(c Doer) bool {
+ w.OnClosing(func(c Doer) bool {
if *closeOnClick {
panic("window closed normally in close on click mode (should not happen)")
}
@@ -30,18 +30,18 @@ func init() {
Stop()
done <- struct{}{}
return true
- }))
- Wait(Do, b.OnClicked(func(c Doer) {
+ })
+ b.OnClicked(func(c Doer) {
println("in OnClicked()")
if *closeOnClick {
Wait(c, w.Close())
Stop()
done <- struct{}{}
}
- }))
- Wait(Do, w.Show())
+ })
+ w.Show()
<-done
- }()
+ })()
err := Go()
if err != nil {
panic(err)