stats icon indicating copy to clipboard operation
stats copied to clipboard

Add mature test suites

Open montanaflynn opened this issue 9 years ago • 8 comments

Even though I've spent a lot of time writing tests for stats I think it could benefit from incorporating other more mature test suites from other statistics tools as well. For instance here's a NIST test suite used by Gnu gsl which could be ported to Go and added as a test for stats.

I'm sure there are other test suites as well, let me know if you have suggestions or want to help with this!

montanaflynn avatar Oct 16 '15 19:10 montanaflynn

Here's the NIST suite + added autocorrelation function: https://github.com/montanaflynn/stats/tree/nist_test_suite

montanaflynn avatar Oct 25 '15 02:10 montanaflynn

I am not sure about what did you mean here, it is about to rewrite NIST test suite in GO? and then replace all tests?

LuizClaudioSantos avatar Jan 12 '21 16:01 LuizClaudioSantos

@LuizClaudioSantos I think the idea was that the more tests the better, so instead of replacing tests it would be adding more tests from mature projects, such as NIST and others that we could find. Actually I already added some of NIST test suite:

https://github.com/montanaflynn/stats/blob/master/nist_test.go

montanaflynn avatar Jan 13 '21 10:01 montanaflynn

What do you think about using https://pkg.go.dev/github.com/stretchr/testify.

tzzed avatar Apr 15 '21 20:04 tzzed

@tzzed I don't see the need for that, we're not using http or mocks so testing is pretty straight forward and easy with the standard library testing.

montanaflynn avatar Apr 16 '21 02:04 montanaflynn

I agree but it is just about to have a lazyness way with require.

tzzed avatar Apr 16 '21 10:04 tzzed

Having a dependency used only for development isn't something I would like to add. I think a little more boilerplate but using standard library is a good trade-off to avoid dependency pains for downstream users.

montanaflynn avatar Apr 17 '21 01:04 montanaflynn

It makes sense!

tzzed avatar Apr 17 '21 02:04 tzzed