This commit is contained in:
pocke 2015-01-07 22:49:37 +09:00
parent edc5e2816d
commit 62b2927abc
1 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,11 @@ import (
"github.com/pocke/pfs"
)
func TestPFSNew(t *testing.T) {
p := pfs.New()
t.Log("PFS: %+v", p)
}
func TestPubSub(t *testing.T) {
pfs := pfs.New()
@ -23,3 +28,11 @@ func TestPubSub(t *testing.T) {
t.Errorf("Expected i == 3, Got i == %d", i)
}
}
func TestSubWhenNotFunction(t *testing.T) {
pfs := pfs.New()
err := pfs.Sub("foobar")
if err == nil {
t.Error("should return error When recieve not function. But got nil.")
}
}