wlabel_test.go 476 B

12345678910111213141516171819202122232425262728293031
  1. package wlabel
  2. import (
  3. "testing"
  4. )
  5. type tester struct {
  6. t *testing.T
  7. }
  8. func TestWuiLabel(t *testing.T) {
  9. sf := &tester{
  10. t: t,
  11. }
  12. sf.new()
  13. }
  14. // Создаёт новую метку
  15. func (sf *tester) new() {
  16. sf.t.Log("new")
  17. lbl := NewWuiLabel("test_lbl")
  18. if lbl == nil {
  19. sf.t.Fatalf("new(): WuiLabel==nil")
  20. }
  21. if txt := lbl.Text(); txt == nil {
  22. sf.t.Fatalf("new(): txt==nil")
  23. }
  24. if html := lbl.Html(); html == "" {
  25. sf.t.Fatalf("new(): html is empty")
  26. }
  27. }