mirror of
https://github.com/taigrr/go-fastping
synced 2025-01-18 05:03:15 -08:00
checking errors
This commit is contained in:
parent
9078c8f204
commit
d19ff13e39
@ -47,6 +47,10 @@ func TestRemoveIP(t *testing.T) {
|
|||||||
t.Fatalf("AddIP length check failed")
|
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 {
|
if err := p.RemoveIP("127.0.0.1"); err != nil {
|
||||||
t.Fatalf("RemoveIP failed: %v", err)
|
t.Fatalf("RemoveIP failed: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user