Skip to content

Commit

Permalink
Add TestToDurationSliceE cases to reach 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello authored and bep committed Feb 14, 2018
1 parent 9ebc15c commit 8965335
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8965335

Please sign in to comment.