parroty / excheck

Property-based testing library for Elixir (QuickCheck style).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

number generator?

ornamentist opened this issue · comments

Thanks for developing ExCheck, looks very useful!

I might be missing something but could we have a number/1 generator function that generates either a random float or integer?

Currently I'm using oneof([real, int]) and wondering whether this belongs in ExCheck or in a helper function?

Stu

Thanks for the comment. I've defined as one generator.
Initially I felt "oneof([real, int])" may suffice, but it may be one similar way of (subset form of) any/0, which is defined using oneof[int(), real(), bool(), atom() ...].