Add test for mixed case handling in hex2ptr_common (#2778)

* Add test for mixed case handling in hex2ptr_common

* Updated hexadecimal value to use uppercase letters in unite tes
pull/2780/head
Kevin 9 months ago committed by GitHub
parent ef858d7b44
commit 8ed8be13df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -18,3 +18,9 @@ def test_hex2ptr_common_invalid_hex():
# Test for invalid hex characters
with pytest.raises(ValueError, match="Invalid hex string"):
hex2ptr_common("zz zz zz")
def test_hex2ptr_common_mixed_case():
"""Test that hex2ptr_common correctly handles mixed case hex strings."""
assert hex2ptr_common("aB cD eF 12") == 0x12EFCDAB
assert hex2ptr_common("FfFf") == 0xFFFF

Loading…
Cancel
Save