mirror of https://github.com/pocke/goevent.git
test
This commit is contained in:
parent
edc5e2816d
commit
62b2927abc
13
pfs_test.go
13
pfs_test.go
|
@ -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.")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue