feat: add jqwik property-based coverage for trie and patch invariants

test: add property-based tests for FrequencyTrie determinism across repeated compilation
test: verify semantic alignment of get(), getAll(), and getEntries()
test: verify binary serialization and compressed persistence round-trip stability
test: verify builder reconstruction preserves observable trie behavior
test: add property-based tests for PatchCommandEncoder encode/apply round-trip and determinism
test: add generated stemmer-trie properties ensuring returned patches reconstruct only acceptable stems
test: introduce bounded reusable jqwik generators and scenario builders for maintainable property coverage
build: add jqwik to test dependencies and integrate it with the existing JUnit Platform setup
test: replace Jupiter display and tag annotations in jqwik suites with jqwik-native metadata to remove discovery warnings
This commit is contained in:
2026-04-16 19:40:29 +02:00
parent 953ce2226a
commit 594abe2c4b
10 changed files with 850 additions and 8 deletions

View File

@@ -1,12 +1,14 @@
#
# After changing dependency versions:
#
# unlock temporarily: LockMode.STRICT -> LockMode.LENIENT
#
# refresh verification metadata:
# ./gradlew --write-verification-metadata sha256 test jmh distZip cyclonedxBom
#
# run:
# ./gradlew --write-locks classes testClasses jmh distZip cyclonedxBom
#
# if needed, refresh verification metadata:
# ./gradlew --write-verification-metadata sha256 test jmh distZip cyclonedxBom
#
# (optional - for Eclipse IDE)
# insert trusted-artifacts into gradle/verification-metadata.xml/verification-metadata/configuration:
# <trusted-artifacts>
@@ -21,6 +23,7 @@
[versions]
junit = "5.14.3"
mockito = "5.23.0"
jqwik = "1.9.3"
[libraries]
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
@@ -29,3 +32,5 @@ junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
jqwik = { module = "net.jqwik:jqwik", version.ref = "jqwik" }

View File

@@ -568,6 +568,46 @@
<sha256 value="1af699f8d9ddab67f9a0d202fbd7915eb0362a5a6dfd5ffc54cafa3465c9cb0a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.jqwik" name="jqwik" version="1.9.3">
<artifact name="jqwik-1.9.3.jar">
<sha256 value="562931e1667308180056a8ce85791f71ab8c37ca8efc2006a163ba5d650e5f73" origin="Generated by Gradle"/>
</artifact>
<artifact name="jqwik-1.9.3.module">
<sha256 value="681316f856db4ea3cac8fcced811127fc1d7016875e5b50aa4a55024513a93d7" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.jqwik" name="jqwik-api" version="1.9.3">
<artifact name="jqwik-api-1.9.3.jar">
<sha256 value="4bce7e80beb6d9d7092a799fa8a509d76cc31dbb20c938a9952965c15d1dd9b2" origin="Generated by Gradle"/>
</artifact>
<artifact name="jqwik-api-1.9.3.module">
<sha256 value="69984416ea2e9f7fde40cfac983d2f540d3a37e9766fd3b0a06fada8f9b4cff2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.jqwik" name="jqwik-engine" version="1.9.3">
<artifact name="jqwik-engine-1.9.3.jar">
<sha256 value="b85592ee78e30239ccfdca7a134f918ee94ebec51ad29a313fc9a676d97b3ede" origin="Generated by Gradle"/>
</artifact>
<artifact name="jqwik-engine-1.9.3.module">
<sha256 value="2c68479ebda9e334bc9033abd2ef227353808f20114f197947b5c7b9646ab8e5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.jqwik" name="jqwik-time" version="1.9.3">
<artifact name="jqwik-time-1.9.3.jar">
<sha256 value="9fd09021d8f03d44990457bf3095cf0aaf34d2785d1108ff22590286c233b3e5" origin="Generated by Gradle"/>
</artifact>
<artifact name="jqwik-time-1.9.3.module">
<sha256 value="c2b056576c8767bfcd7efdd982890fbc71e608fb5c9c80fc145cfee6adeeaa24" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.jqwik" name="jqwik-web" version="1.9.3">
<artifact name="jqwik-web-1.9.3.jar">
<sha256 value="6aee9d583c1ff9efe319b2fa0bc9d75fc616de6d1f240ddbd2af9eabda483dbe" origin="Generated by Gradle"/>
</artifact>
<artifact name="jqwik-web-1.9.3.module">
<sha256 value="38c86130c8b86c1657b4f8256e065ee08551f7c5ce728d1a5be8f63133b14554" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.sf.jopt-simple" name="jopt-simple" version="4.9">
<artifact name="jopt-simple-4.9.jar">
<sha256 value="26c5856e954b5f864db76f13b86919b59c6eecf9fd930b96baa8884626baf2f5" origin="Generated by Gradle"/>