Add a test on isZero to try to get the last coverage line
This commit is contained in:
parent
eb29b62024
commit
91ccd6de3b
|
@ -82,3 +82,13 @@ func TestInvalidReflectValue(t *testing.T) {
|
|||
func SortValues(values []reflect.Value, cs *ConfigState) {
|
||||
sortValues(values, cs)
|
||||
}
|
||||
|
||||
func TestIsZero(t *testing.T) {
|
||||
if !isZero(reflect.ValueOf(0)) {
|
||||
t.Errorf("isZero should be true for 0")
|
||||
}
|
||||
var v reflect.Value
|
||||
if isZero(v) {
|
||||
t.Errorf("isZero should be false for an invalid Value")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue