summaryrefslogtreecommitdiff
path: root/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-12-12 18:48:43 -0500
committerPietro Gagliardi <[email protected]>2015-12-12 18:48:43 -0500
commit2347394944a12e075e6f8264ed6b8122363d50df (patch)
treeb5e6f8bbd2fddad391998b9894bc3a8e66a39f44 /zz_test.go
parentae710db0e9ed08ff7ae1c90d440af3ee3efe721f (diff)
Added Separator.
Diffstat (limited to 'zz_test.go')
-rw-r--r--zz_test.go26
1 files changed, 3 insertions, 23 deletions
diff --git a/zz_test.go b/zz_test.go
index 657f5dc..bc788d2 100644
--- a/zz_test.go
+++ b/zz_test.go
@@ -2,38 +2,18 @@
package ui
-import "time"
import "testing"
func TestIt(t *testing.T) {
err := Main(func() {
w := NewWindow("Hello", 320, 240, false)
- stop := make(chan struct{})
w.OnClosing(func(w *Window) bool {
- stop <- struct{}{}
Quit()
return true
})
- p := NewProgressBar()
- w.SetChild(p)
- go func() {
- value := 0
- ticker := time.NewTicker(time.Second / 2)
- for {
- select {
- case <-ticker.C:
- QueueMain(func() {
- value++
- if value > 100 {
- value = 0
- }
- p.SetValue(value)
- })
- case <-stop:
- return
- }
- }
- }()
+ s := NewHorizontalSeparator()
+ w.SetChild(s)
+ w.SetMargined(true)
w.Show()
})
if err != nil {