You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tea/selection_test.go

22 lines
431 B
Go

package tea
import (
"testing"
)
func TestNewSelection(t *testing.T) {
s := NewSelection(Passing("A"))
if len(s.nodes) != 1 {
t.Fatalf("expected 1 node in new selection, saw %d", len(s.nodes))
}
l := s.nodes[0]
if len(l.children) != 0 {
t.Fatalf("new selection should not have any children, but has %d", len(l.children))
}
if len(l.xnodes) != 1 {
t.Fatalf("expected 1 xnode in lnode, saw %d", len(l.xnodes))
}
}