datasets: add unit tests
Some unit tests asserting e.g. the length or some other property of the datasets would be nice to have.
I've been interested in contributing to this project for a while! Is it ok if I take a shot at this issue? I think maybe checking the length, the first and the last element of every dataset could constitute the tests.
Hi @Magalame , any contribution large or small is very welcome ^^
Hi again! I was wondering if it wouldn't be more practical to using some form of hashing? Maybe something like hashable?
@Magalame how would you use hashing for this ?
I think I misunderstood the purpose of the issue, I thought it was to check the integrity of the data
Actually I think there is a reasonable way to use hashing for this. We basically want unit tests to make sure that the functions in datasets load the data sets properly.
So a nice way to do that would be, approximately, for each data set:
do
abas <- getDataset abalone
head abas `shouldBe` valueOfHeadOfAbas
last abas `shouldBe` valueOfLastOfAbas
force (hash abas) `shouldBe` fixedHash
and then the same for getDatavec
It would have the advantage of partly solving #29. And Haskell has a nice Hashable class
ping @ocramz