Unit testing for def/ module.

Added unit tests to test code in def/ module.
This commit is contained in:
Pradyumna Kaushik 2019-10-12 06:48:45 +00:00
parent e24b8a08c9
commit bac60e872a
396 changed files with 83991 additions and 13209 deletions

View file

@ -8,15 +8,19 @@ func (s statsErr) Error() string {
return s.err
}
func (s statsErr) String() string {
return s.err
}
// These are the package-wide error values.
// All error identification should use these values.
var (
EmptyInput = statsErr{"Input must not be empty."}
SampleSize = statsErr{"Samples number must be less than input length."}
NaNErr = statsErr{"Not a number"}
NegativeErr = statsErr{"Slice must not contain negative values."}
ZeroErr = statsErr{"Slice must not contain zero values."}
BoundsErr = statsErr{"Input is outside of range."}
SizeErr = statsErr{"Slices must be the same length."}
InfValue = statsErr{"Value is infinite."}
EmptyInputErr = statsErr{"Input must not be empty."}
NaNErr = statsErr{"Not a number."}
NegativeErr = statsErr{"Must not contain negative values."}
ZeroErr = statsErr{"Must not contain zero values."}
BoundsErr = statsErr{"Input is outside of range."}
SizeErr = statsErr{"Must be the same length."}
InfValue = statsErr{"Value is infinite."}
YCoordErr = statsErr{"Y Value must be greater than zero."}
)