mirror of
https://github.com/stretchr/testify.git
synced 2025-05-29 18:52:43 +00:00
Fix actual float conversion error message under calcRelativeError
This commit is contained in:
parent
f6abca5936
commit
4b92304da8
@ -954,7 +954,7 @@ func calcRelativeError(expected, actual interface{}) (float64, error) {
|
||||
}
|
||||
bf, bok := toFloat(actual)
|
||||
if !bok {
|
||||
return 0, fmt.Errorf("expected value %q cannot be converted to float", actual)
|
||||
return 0, fmt.Errorf("actual value %q cannot be converted to float", actual)
|
||||
}
|
||||
|
||||
return math.Abs(af-bf) / math.Abs(af), nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user