package ledger import "testing" func TestLikeAcc(t *testing.T) { delta := Delta{Account: "x"} if got := LikeAcc("^x$")(delta); !got { t.Error(got) } if got := LikeAcc("^y$")(delta); got { t.Error(got) } } func TestLikesAll(t *testing.T) { delta := Delta{Account: "x"} if likes := (likes{LikeAcc("^x$")}); !likes.all(delta) { t.Error(likes.all(delta)) } if likes := (likes{LikeAcc("^y$")}); likes.all(delta) { t.Error(likes.all(delta)) } }