Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QCheck.Gen.{ui32,ui64} not unsigned #305

Open
jmid opened this issue Dec 12, 2024 · 0 comments
Open

QCheck.Gen.{ui32,ui64} not unsigned #305

jmid opened this issue Dec 12, 2024 · 0 comments

Comments

@jmid
Copy link
Collaborator

jmid commented Dec 12, 2024

The current documentation https://c-cube.github.io/qcheck/0.22/qcheck-core/QCheck/Gen/index.html#val-ui32
says

val ui32 : int32 t
Generates (unsigned) int32 values.

val ui64 : int64 t
Generates (unsigned) int64 values.

However that seems off, as I'm seeing several negative outputs:

# QCheck.Gen.(generate ~n:10 ui32);;
- : int32 list =
[63427152l; 326131724l; 908231618l; -1692656491l; 676133865l; 1856308549l;
 -163216644l; -540852095l; -943426166l; 30873897l]
# QCheck.Gen.(generate ~n:10 ui64);;
- : int64 list =
[-3254598462914660785L; -6544335298499621736L; 6894849975125638767L;
 -4841072242772461851L; 5942088625874337353L; -4146767578361986769L;
 -6246245497190989365L; 2057086657278494593L; 1640197283483944504L;
 4458365409476190594L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant