test(crypto): expand is_uuid_like coverage for nibbles, Max, and non-hex characters - #2644
Merged
Merged
Conversation
🤖 Augment PR SummarySummary: Expands unit test coverage for Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
jviotti
approved these changes
Jul 21, 2026
jviotti
left a comment
Member
There was a problem hiding this comment.
Looks good but formatting and DCO are failing!
jviotti
reviewed
Jul 21, 2026
jviotti
reviewed
Jul 21, 2026
…hex characters Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
vtushar06
force-pushed
the
test-uuid-like-coverage
branch
from
July 23, 2026 06:20
4130c5a to
f56d474
Compare
Contributor
Author
|
Hey @jviotti, Pr is ready for another look. |
jviotti
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added 8 test blocks to
is_uuid_like. Core already passes all of them, so this is coverage, not a fix.What is new:
valid_max- the Max UUID (allf), RFC 9562 section 5.10, alongside the existing Nil case.valid_all_version_nibblesandvalid_all_variant_nibbles- loops over0-fat index 14 and index 19, pinning thatis_uuid_liketreats the version and variant as semantic fields, not syntactic constraints (RFC 9562 sections 4.1 and 4.2).invalid_underscore_separator,invalid_leading_plus,invalid_hex_radix_prefix,invalid_non_ascii_digit- characters that a lenient integer parser tolerates (_,+,0x, a Unicode decimal digit) butHEXDIGdoes not.is_uuid_likerejects them through its byte-level hex check, unlike a checker that validates the hex content with an integer parser.invalid_trailing_newline- a complete UUID followed by\n.How I checked the expected values: I compiled and ran every block against the real
is_uuid_likebefore staging - all 8 pass.RFC references: RFC 9562 sections 4, 4.1, 4.2, 5.9, 5.10.