Arbitrary[Algebraic] only generates ConstantLong Exprs
This is the Gen used for Algebraic right now:
lazy val algebraic: Gen[Algebraic] =
arbitrary[Int].map(Algebraic(_))
I'd argue to really test Algebraic we need a more throrough Gen.
Definitely agree. One annoyance is that the Algebraic tests can be pretty slow and making them more complicated will only make things worse. We'll probably want to disproportionately weight the random Algebraics towards simpler ones, but still allow some complex ones through.
We could potentially restrict the number of values generated for CI only, WDYT?
How do we do that, actually?
PS: I dream of a scalacheck-type framework, where the complexity of generated instances could be described by a tuple of integers (i,j,k,...); properties would then declare a time t(i,j,k,...) and space s(i,j,k,...) complexity. Then, when running the tests, we could assign a time budget for all the runs (which the sum of all time complexities must not overrun), and a memory budget (which each run can't cross).