summaryrefslogtreecommitdiff
path: root/zz_test.go
blob: cc5ff7404f422e4ba09f7ef1fa15e00f29a0a879 (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
// 11 december 2015

package ui

import "testing"

func TestIt(t *testing.T) {
	err := Main(func() {
		w := NewWindow("Hello", 320, 240, false)
		w.OnClosing(func(w *Window) bool {
			Quit()
			return true
		})
		t := NewTab()
		w.SetChild(t)
		w.SetMargined(true)
		t.Append("First Page", NewButton("Click Me"))
		t.Append("Second Page", NewButton("Click Me Too"))
		t.SetMargined(0, true)
		w.Show()
	})
	if err != nil {
		t.Fatal(err)
	}
}