Skip to content

range_subset bug #198

@zhezhouzz

Description

@zhezhouzz

There is a bug in the implementation of "QCheck.Gen.range_subset"(https://github.com/c-cube/qcheck/blob/master/src/core/QCheck.ml#L265):

for i = high - size to high do
      let pos = int_range high i st in

you set i as an number less than high(as size is positive number), and call int_range high i, however your int_range requires the first argument(the low) is less than the second argument(the high). Then calling QCheck.Gen.range_subset and QCheck.Gen.array_subset will always lead an (Invalid_argument Gen.int_range) excpection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions