From 23c8abeb3b5fac3b59bf3a7199038cefd86f79fa Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Wed, 27 Oct 2021 23:56:13 +0700 Subject: [PATCH] test: nil value --- decrr_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/decrr_test.go b/decrr_test.go index 51b01cf..a25738f 100644 --- a/decrr_test.go +++ b/decrr_test.go @@ -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) + } +}