From 8965335b8c7107321228e3e3702cab9832751bac Mon Sep 17 00:00:00 2001 From: Xavier Vello Date: Wed, 14 Feb 2018 18:35:30 +0100 Subject: [PATCH] Add TestToDurationSliceE cases to reach 100% coverage --- cast_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cast_test.go b/cast_test.go index 9f1b1f1..d9b0b01 100644 --- a/cast_test.go +++ b/cast_test.go @@ -1006,9 +1006,12 @@ func TestToDurationSliceE(t *testing.T) { {[]string{"1s", "1m"}, []time.Duration{time.Second, time.Minute}, false}, {[]int{1, 2}, []time.Duration{1, 2}, false}, {[]interface{}{1, 3}, []time.Duration{1, 3}, false}, + {[]time.Duration{1, 3}, []time.Duration{1, 3}, false}, + // errors {nil, nil, true}, {testing.T{}, nil, true}, + {[]string{"invalid"}, nil, true}, } for i, test := range tests {