nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
714 stars 119 forks source link

Print classify percentages up to two significant digits #167

Closed michalpalka closed 7 years ago

michalpalka commented 7 years ago

Currently, the percentage values of occurrences of labels in test cases are printed using integral percentages, which is not precise enough if the labels occur very rarely. This commit prints them up to two siginificant digits.

michalpalka commented 7 years ago

Actually, let me refactor this-I'll submit a new version soon.

I take it back-the code is ready for consideration.

nick8325 commented 7 years ago

It seems to no longer print the labels in decreasing order of frequency.

I think it should be possible to do this simpler - I'll have a go at it.

sol commented 7 years ago

How will this relate to the labels field of the Result type? Does it represent the same information? Will that still be the case after this PR?

I'm asking because it's type is [(String, Int)], so I would have assumed we need to change that too, if we want to increase the precision.

nick8325 commented 7 years ago

Yes, changing the result type to match seems like a good idea...