Skip to content

Consolidate and Move Kotlin forward

Compare
Choose a tag to compare
@jlink jlink released this 02 Sep 09:06
· 210 commits to main since this release

New and Enhanced Features

  • Upgraded to KotlinX 1.7.3

  • Upgraded to JUnit Platform 1.10.0

  • Upgraded to Kotlin 1.9.10

  • Added StringArbitrary.uniqueChars() to generate strings with unique characters.
    Discussion in issue 506.
    This is an experimental feature.

  • Added constraint annotation @UniqueChars for String parameters.
    This is an experimental feature.

  • Added Arbitraries.fromGeneratorWithSize(..).
    See issue 494.
    This is an experimental feature.

  • The Kotlin module got a brand new Combinator DSL.

  • Configurators that are based on ArbitraryConfiguratorBase will now consider
    any public method the name of which starts with configure as a configuration method candidate.
    This allows heterogeneous arbitrary configurators
    that differ in arbitrary type only.

  • Multiple @CharRange annotations are now also possible for @ForAll char parameters.

  • EXPERIMENTAL APIs promoted to MAINTAINED:

    • Arbitrary.edgeCases(Consumer<EdgeCases.Config<T>> configurator)
    • Arbitrary.withoutEdgeCases()
    • @Property.edgeCases()
    • @ForAll.supplier()
    • @From.supplier()
    • @Provide.ignoreExceptions()
    • Combinator[2-8].filter(..)
    • ListCombinator.filter(..)
    • NumericalArbitrary.withDistribution(..)
    • TraverseArbitrary
    • TypeArbitrary.enableRecursion()
    • @UseType.enableRecursion()
    • DomainContext.getReportingFormats()
    • JqwikSession

Breaking Changes

  • Configurators that are based on ArbitraryConfiguratorBase must mark their
    configure() methods as public.
    Private and package-scope methods are no longer supported considered as
    configuration method candidates.

  • TypeUsage.canBeAssignedTo(TypeUsage) behaves now closer to the Java compiler's rules
    about allowing assignments - including co- and contravariance.
    This has the potential to break domains, arbitrary providers, and lifecycle hooks
    that depend on the old, more loose, behaviour.

  • @Provide methods are now matched more strictly, based on assignability of returned arbitrary type.
    That means that potential mismatches of generated values and the corresponding @ForAll
    parameters will show up already at property setup time through a CannotFindArbitraryException.

  • StringArbitrary.repeatChars(0.0) will now redirect to StringArbitrary.uniqueChars().
    Previously it used to just make the probability of repeating characters very low.
    See discussion in issue 506.

  • Removed deprecated method TypeArbitrary.use(Executable).

  • Removed deprecated methods ActionChainArbitrary.addAction(action)
    and ActionChainArbitrary.addAction(weight, action).

Bug Fixes

  • Fixed bug when selecting parameterized values from domain contexts.
    See issue 499.

  • Fixed type variable resolution bug.
    See issue 492.

  • Fixed bug where presence of Kotlin module could mess up annotations
    of parameters in Java classes.