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

Range checks for types #210

Merged
merged 4 commits into from
Nov 14, 2023
Merged

Range checks for types #210

merged 4 commits into from
Nov 14, 2023

Conversation

rooooooooob
Copy link
Collaborator

@rooooooooob rooooooooob commented Aug 31, 2023

Range tests for all types (except floats). Ints, text, bytes, maps, arrays.
Covers preserve-encodings=true and =false.

Includes test cases for both.

also fixes some clippy warnings in generated code

@rooooooooob rooooooooob marked this pull request as draft August 31, 2023 00:54
@gostkin
Copy link
Contributor

gostkin commented Nov 10, 2023

@rooooooooob is this ready for review?

@rooooooooob
Copy link
Collaborator Author

I was just going to add more tests but I noticed I found some cases are not actually handled right. I'll try and see if I can get this fixed and ready today.

now tests for both preserve-encodings and not with all 3 of those
as well as bounds that go across both
@rooooooooob rooooooooob marked this pull request as ready for review November 12, 2023 00:04
@rooooooooob
Copy link
Collaborator Author

@gostkin it's ready now. While making the test cases I noticed there were actually some annoying to solve cases not covered/implemented but now we should have everything covered for nint/uint/int with ranges above/below for preserve-encodings and without (+ the length ones for arrays/maps/text/bytes).

@rooooooooob rooooooooob requested a review from gostkin November 13, 2023 19:20
@rooooooooob rooooooooob changed the title [WIP] Range checks for types Range checks for types Nov 13, 2023
@gostkin gostkin merged commit 3385715 into master Nov 14, 2023
1 check passed
rooooooooob added a commit that referenced this pull request Dec 26, 2023
Specifically tests for support for #121 for plain groups.

For multi arrays covered by #120
For single ones covered by #210

We are keeping #121 open for now as the case for single non-plain-groups
e.g. `[uint]` is not covered. We've yet to see this used anywhere in
Cardano so it's low priority to fix.
rooooooooob added a commit that referenced this pull request Dec 27, 2023
Specifically tests for support for #121 for plain groups.

For multi arrays covered by #120
For single ones covered by #210

We are keeping #121 open for now as the case for single non-plain-groups
e.g. `[uint]` is not covered. We've yet to see this used anywhere in
Cardano so it's low priority to fix.
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

Successfully merging this pull request may close these issues.

2 participants