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

Allow schema to define integer range constraints #216

Merged
merged 4 commits into from
May 29, 2023

Conversation

tlsa
Copy link
Owner

@tlsa tlsa commented May 29, 2023

If both the min and the max are zero, then the range check is ignored.

This means it's possible to leave them unset in a struct initialiser if you don't require the feature.

Closes #138.

@tlsa tlsa added this to the Version 2 milestone May 29, 2023
@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Merging #216 (9205ba7) into main (9d8f7fb) will decrease coverage by 0.02%.
The diff coverage is 96.15%.

@@            Coverage Diff             @@
##             main     #216      +/-   ##
==========================================
- Coverage   97.12%   97.11%   -0.02%     
==========================================
  Files          10       10              
  Lines        2017     2043      +26     
  Branches      424      432       +8     
==========================================
+ Hits         1959     1984      +25     
  Misses         28       28              
- Partials       30       31       +1     
Flag Coverage Δ
unittests 97.11% <96.15%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/load.c 98.45% <96.15%> (-0.06%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tlsa tlsa merged commit 55d7973 into main May 29, 2023
@tlsa tlsa mentioned this pull request May 29, 2023
9 tasks
@tlsa tlsa deleted the tlsa/integer-range-constraints branch May 22, 2024 19:48
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.

Specify value range in Schema
1 participant