Skip to content

v0.10.0

Compare
Choose a tag to compare
@Seelengrab Seelengrab released this 12 Aug 17:26
· 16 commits to main since this release
d974086

v0.10.0

Full Changelog: v0.9.2...v0.10.0

Breakage

This is a technically breaking release, but I don't expect any user code to actually break due to this - any third party usage of the AbstractIntegrated interface would have had to either implement freeze already or match the existing (implicit) interface of Integrated. The way to fix any potential breakage relating to this is to decide which of FiniteIntegrated or InfiniteIntegrated should be subtyped, and implement the requirements accordingly. Existing types that followed what AbstractIntegrated did should likely implement InfiniteIntegrated.

New Features

  • There are now two new abstract types subtyping AbstractIntegrated, InfiniteIntegrated and FiniteIntegrated. As their name suggests, these two represent integrated shrinkers that continously generate new objects, and integrated shrinkers that stop generating after a finite amount of calls to generate. The existing types generally subtype InfiniteIntegrated. The existing combinators, like map, filter, interleave, vector, tuple and array support these.
  • There are new integrated shrinkers subtyping FiniteIntegrated, namely IntegratedLengthBounded, IntegratedOnce, IntegratedFiniteIterator.
  • A new integrated shrinker for chaining together finite & infinite integrated shrinkers has been added, IntegratedChain.
  • There are a number of new default integrated shrinkers for floating point values, ifloat, ifloatinf, ifloatnan, ifloatinfnan, as well as two new integrated shrinkers for signed integers, inegint and iposint.

The first two points are implementing #10.

Bugfixes

  • Fixed a bug where check incorrectly only tested the first element that was generated by stateful integrated shrinkers.
  • map is now type stable, as long as the given function & the types produced by the integrated shrinker are type stable. This relies on type inference and is not guaranteed, but should not lead to errors if it fails.
  • UniqueIterator (and by extension, anything using it such as Integrated) now correctly treat NaNs with different bitpatterns as distinct values.
  • Fixed a bug where floating point generation sometimes incorrectly assembled some values, resulting in improper generation of infinities.

Others

..as well as more tests & more docs!