From d19ff13e39e8eb36cd42abb2dd5b62cb1c94f0de Mon Sep 17 00:00:00 2001 From: Murilo Santana Date: Wed, 22 Apr 2015 10:57:50 -0300 Subject: [PATCH] checking errors --- fastping_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fastping_test.go b/fastping_test.go index 5f8b5bd..12dd2f4 100644 --- a/fastping_test.go +++ b/fastping_test.go @@ -47,6 +47,10 @@ func TestRemoveIP(t *testing.T) { t.Fatalf("AddIP length check failed") } + if err := p.RemoveIP("127.0"); err == nil { + t.Fatal("RemoveIP, invalid IP should fail") + } + if err := p.RemoveIP("127.0.0.1"); err != nil { t.Fatalf("RemoveIP failed: %v", err) }