Add a test on isZero to try to get the last coverage line

This commit is contained in:
Peter Ebden 2018-08-15 18:33:31 +01:00
parent eb29b62024
commit 91ccd6de3b
1 changed files with 10 additions and 0 deletions

View File

@ -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")
}
}