test: nil value

This commit is contained in:
Reinaldy Rafli 2021-10-27 23:56:13 +07:00
parent 198cc25b37
commit 23c8abeb3b
No known key found for this signature in database
GPG Key ID: CFDB9400255D8CB6
1 changed files with 8 additions and 0 deletions

View File

@ -26,3 +26,11 @@ func TestWrap(t *testing.T) {
t.Error("different than expected:", w.Error(), "\nexpected:", expected)
}
}
func TestNilValue(t *testing.T) {
w := decrr.Wrap(nil)
if w != nil {
t.Error("should be nil, got:", w)
}
}