Skip to content

Commit f583adb

Browse files
committed
Fix BitSet.range property checking.
1 parent 0e3187f commit f583adb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

props-core/src/test/java/fj/data/hamt/BitSetProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ Gen<List<Integer>> bitSetIndices(int n) {
153153
Property rangeTest() {
154154
return property(arbNaturalLong, bitSetIndices(4), (x, list) -> {
155155
int l = list.index(0);
156-
int m = list.index(1);
157156
int h = list.index(2);
157+
int m = Math.max(l, Math.min(list.index(1), h - 1));
158158
int vh = list.index(3);
159159

160160
BitSet bs1 = longBitSet(x);

0 commit comments

Comments
 (0)