feat: added test case for error slice to parse to string
This commit is contained in:
parent
c01685bb84
commit
e38d93ddee
@ -6,6 +6,7 @@
|
|||||||
package cast
|
package cast
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"testing"
|
"testing"
|
||||||
@ -1051,6 +1052,7 @@ func TestToStringSliceE(t *testing.T) {
|
|||||||
{[]string{"a", "b"}, []string{"a", "b"}, false},
|
{[]string{"a", "b"}, []string{"a", "b"}, false},
|
||||||
{[]interface{}{1, 3}, []string{"1", "3"}, false},
|
{[]interface{}{1, 3}, []string{"1", "3"}, false},
|
||||||
{interface{}(1), []string{"1"}, false},
|
{interface{}(1), []string{"1"}, false},
|
||||||
|
{[]error{errors.New("a"), errors.New("b")}, []string{"a", "b"}, false},
|
||||||
// errors
|
// errors
|
||||||
{nil, nil, true},
|
{nil, nil, true},
|
||||||
{testing.T{}, nil, true},
|
{testing.T{}, nil, true},
|
||||||
|
Loading…
Reference in New Issue
Block a user