Skip to content

Releases: jqwik-team/jqwik

Minor Bugfix

03 Dec 12:58
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgraded to Kotlin 2.1.0

Breaking Changes

  • The bug fix for issue 599 can
    lead to different exception types - IllegalArgumentException instead of CannotFindArbitraryException -
    for provider methods that create objects of the wrong type.

Dependency Upgrades and Bug Fixes

  • Fixed bug reported in issue 599
    by making return type matching for provider methods loose again.

JqwikSession Enhancements

30 Sep 12:29
Compare
Choose a tag to compare

New and Enhanced Features

  • Introduced API to handle random seeds outside jqwik's lifecycle.
    See issue 581.

    • Added JqwikSession.getRandom()
    • Added JqwikSession.start(String randomSeed)
    • Added JqwikSession.run(String randomSeed, Runnable runnable)

Breaking Changes

No breaking changes

Dependency Upgrades and Bug Fixes

  • Upgrade to Gradle 8.10.2
  • Upgraded to JUnit Platform 1.11.1
  • Upgraded to KotlinX 1.9.0

Kotlin 2.0 and Nullability Annotations

28 Jun 07:45
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgraded to Kotlin 2.0.0

  • Upgraded to JUnit Platform 1.10.3

Breaking Changes

  • StatisticsCoverage.checkQuery(Predicate<? super List<?>> query):
    query is now of type Predicate<? super List<?>> instead of Predicate<? super List<Object>>.

  • Nullability annotations have been added to many API methods and interfaces.
    This could lead to compile-time warnings or errors in your code if you are using tool chains that validate those.

  • UniqueElements.by() now requires a Class<? extends Function<? extends @Nullable Object, ?>>
    instead of a Class<? extends Function<?, Object>>.

Bug Fixes

  • Tools like CheckerFramework did not play well with jqwik's (wrong) usage of @Nullable on type variables.
    This has been fixed. See issue 575 for details.
    Thanks to vlsi for working out all the nitty, gritty details!

  • Fixed type matching bug as revealed in this comment

Bug Fix

24 May 08:44
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgraded to Kotlin 1.9.24

Bug Fixes

  • Fixed bug that led to duplicate lifecycle invocations under inheritance.
    See issue 562.

Some Kotlin Care

15 Mar 08:08
Compare
Choose a tag to compare

New and Enhanced Features

  • Kotlin module: Added anyForSubtypeOf<MyInterface>().
    Many thanks to jibidus for the contribution!

  • Upgraded to Kotlin 1.9.23

Breaking Changes

No breaking changes

Bug Fixes

  • Fixed bug in Kotlin module that let Java properties fail.
    See issue 557.

Platform Upgrade and a few Fixes

23 Feb 08:12
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgraded to KotlinX 1.8.0

  • Upgraded to JUnit Platform 1.10.2

  • Upgraded to Kotlin 1.9.22

Breaking Changes

No breaking changes

Bug Fixes

  • Shrinking of strings with uniqueChars() constraint did not work properly.
    See issue 541.

  • Fixed integer generation bug with uniform distribution.
    See issue 544:

Important Fixes for Java >= 18

23 Nov 08:06
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgraded to JUnit Platform 1.10.0

Breaking Changes

No breaking changes

Bug Fixes

  • Nested test containers using @Group have not been working properly with JDK >= 18.
    Now they do. See issue 528.

  • Fixed stack overflow exception while shrinking.
    See issue 526.

  • Fixed out of memory error while shrinking.
    See issue 527.
    Many thanks to Juhan Oskar Hennoste for providing a fix.

Just Fixing Bugs

20 Oct 12:40
Compare
Choose a tag to compare

New and Enhanced Features

No new features

Breaking Changes

No breaking changes

Bug Fixes

  • Fixed bug when using Combinators.combine() on empty list of arbitraries.
    See issue 522.

  • Fixed type resolution bug.
    See issue 519.

Consolidate and Move Kotlin forward

02 Sep 09:06
Compare
Choose a tag to compare

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.

Lifecycle Enhancements for Micronaut Extension

04 Jul 10:02
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgraded to KotlinX 1.7.2

  • Upgraded to JUnit Platform 1.9.3

  • Upgraded to Kotlin 1.8.22

  • Added interface method LifecycleContext.findRepeatableAnnotations(annotationClass)
    and implementations in all subtypes.

  • Performance improvement for @UniqueElements. Many thanks to DirkToewe.
    See #491.

  • Added interface MethodLifecycleContext as a supertype of both
    PropertyLifecycleContext and TryLifecycleContext.

Breaking Changes

  • The new interface MethodLifecycleContext is a supertype of both
    PropertyLifecycleContext and TryLifecycleContext.
    This could lead to compile-time errors in rare cases of self-implemented
    context classes.

Bug Fixes

  • Fixed bug in AroundPropertyHook extensions combined with @AfterProperty methods.
    See Issue 473.