blob: 45e8f83ec7065c90e0df2d34582a0836440b6c8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package field
import (
"reflect"
"testing"
"github.com/stretchr/testify/require"
)
func requireErrorTypeMatch(t *testing.T, err error, expected error) {
require.Equalf(t, reflect.TypeOf(err), reflect.TypeOf(expected), "Invalid error type. Got %s but expected %s", reflect.TypeOf(err), reflect.TypeOf(expected))
}
func TestErrorsCoverage(t *testing.T) {
readErr := ReadError{}
_ = readErr.Error()
_ = readErr.Unwrap()
decodeError := DecodeError{}
_ = decodeError.Error()
}
|