massert: make Len error a bit more helpful

This commit is contained in:
Brian Picciano 2018-08-14 15:38:24 -04:00
parent 7f0b8056d7
commit 235e9a1850

View File

@ -425,7 +425,7 @@ func Len(set interface{}, length int) Assertion {
if err != nil {
return err
} else if len(setVV) != length {
return errors.New("set not correct length")
return fmt.Errorf("set not correct length, is %d", len(setVV))
}
return nil
}, toStr(set)+" has length "+strconv.Itoa(length), 0)