From 62b2927abc075a776d9db00887cd5cf1ce1e2791 Mon Sep 17 00:00:00 2001 From: pocke Date: Wed, 7 Jan 2015 22:49:37 +0900 Subject: [PATCH] test --- pfs_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pfs_test.go b/pfs_test.go index 80a6bed..adfceba 100644 --- a/pfs_test.go +++ b/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.") + } +}