예제 #1
0
func TestInfo(t *testing.T) {
	l := New(os.Stdout)
	l.Run()
	l.Info("hello world")

	l.Stop()
}
예제 #2
0
func TestSetMax(t *testing.T) {

	l := New(os.Stdout)
	l.Run()
	fmt.Println(l.max)
	l.Stop()

	ll := New(os.Stdout)
	ll.SetMax(1000)
	if ll.max != 1000 {
		t.Error("SetMax can done before run", ll.max)
	}
	ll.Run()
	ll.SetMax(50)
	if ll.max == 50 {
		t.Error("SetMax should done before Run", ll.max)
	}
	ll.Stop()
}