Top PBT Candidates (unit tests)
HIGH priority:
#: 1
Target: NaturalSortOrder.compare()
Property: Comparator contract: transitivity, antisymmetry, reflexivity
File: spi/src/main/java/hosh/spi/Values.java
────────────────────────────────────────
#: 2
Target: NumericValue/SizeValue.merge()
Property: Commutativity, associativity, identity with none
File: Values.java lines 248, 311
────────────────────────────────────────
#: 3
Target: Sort.run()
Property: Idempotence: sort twice = sort once
File: modules/text/…/TextModule.java
────────────────────────────────────────
#: 4
Target: Take/Drop.run()
Property: Partition: take(n) + drop(n) = original
File: TextModule.java
MEDIUM priority:
│ 5 │ Distinct/Duplicated │ Complement: distinct ∪ duplicated = all records
│ 6 │ Sum/Min/Max │ Order independence (commutativity of fold)
│ 7 │ Enumerate │ Indices are strictly monotonic 1..n
│ 8 │ Records.append() │ Size invariant: record.append(k,v).size() == record.size() + 1
Migration Plan
- Add jqwik to parent pom.xml (replace or alongside QuickTheories)
- Migrate existing QT tests in ExitStatusTest and ValuesTest to jqwik
- Add new @Property tests for candidates above
Existing QT tests in spi are small (2 files) — migration is cheap.
Top PBT Candidates (unit tests)
HIGH priority:
#: 1
Target: NaturalSortOrder.compare()
Property: Comparator contract: transitivity, antisymmetry, reflexivity
File: spi/src/main/java/hosh/spi/Values.java
────────────────────────────────────────
#: 2
Target: NumericValue/SizeValue.merge()
Property: Commutativity, associativity, identity with none
File: Values.java lines 248, 311
────────────────────────────────────────
#: 3
Target: Sort.run()
Property: Idempotence: sort twice = sort once
File: modules/text/…/TextModule.java
────────────────────────────────────────
#: 4
Target: Take/Drop.run()
Property: Partition: take(n) + drop(n) = original
File: TextModule.java
MEDIUM priority:
│ 5 │ Distinct/Duplicated │ Complement: distinct ∪ duplicated = all records
│ 6 │ Sum/Min/Max │ Order independence (commutativity of fold)
│ 7 │ Enumerate │ Indices are strictly monotonic 1..n
│ 8 │ Records.append() │ Size invariant: record.append(k,v).size() == record.size() + 1
Migration Plan
Existing QT tests in spi are small (2 files) — migration is cheap.