2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00

Added more tests for from_chars verifying unexpected end of input.

The added tests check unexpected end of input on even and odd character
positions, since these are handled separately in SIMD.
This commit is contained in:
Andrey Semashev
2025-12-31 20:09:58 +03:00
parent 7e50b1aaa7
commit 831a9e6eab

View File

@@ -33,6 +33,30 @@ int main()
test( U"", 0, from_chars_error::unexpected_end_of_input );
test( u8"", 0, from_chars_error::unexpected_end_of_input );
test( "0", 1, from_chars_error::unexpected_end_of_input );
test( L"0", 1, from_chars_error::unexpected_end_of_input );
test( u"0", 1, from_chars_error::unexpected_end_of_input );
test( U"0", 1, from_chars_error::unexpected_end_of_input );
test( u8"0", 1, from_chars_error::unexpected_end_of_input );
test( "01", 2, from_chars_error::unexpected_end_of_input );
test( L"01", 2, from_chars_error::unexpected_end_of_input );
test( u"01", 2, from_chars_error::unexpected_end_of_input );
test( U"01", 2, from_chars_error::unexpected_end_of_input );
test( u8"01", 2, from_chars_error::unexpected_end_of_input );
test( "01234567-89aB-cDeF-0123-456789AbCd", 34, from_chars_error::unexpected_end_of_input );
test( L"01234567-89aB-cDeF-0123-456789AbCd", 34, from_chars_error::unexpected_end_of_input );
test( u"01234567-89aB-cDeF-0123-456789AbCd", 34, from_chars_error::unexpected_end_of_input );
test( U"01234567-89aB-cDeF-0123-456789AbCd", 34, from_chars_error::unexpected_end_of_input );
test( u8"01234567-89aB-cDeF-0123-456789AbCd", 34, from_chars_error::unexpected_end_of_input );
test( "01234567-89aB-cDeF-0123-456789AbCdE", 35, from_chars_error::unexpected_end_of_input );
test( L"01234567-89aB-cDeF-0123-456789AbCdE", 35, from_chars_error::unexpected_end_of_input );
test( u"01234567-89aB-cDeF-0123-456789AbCdE", 35, from_chars_error::unexpected_end_of_input );
test( U"01234567-89aB-cDeF-0123-456789AbCdE", 35, from_chars_error::unexpected_end_of_input );
test( u8"01234567-89aB-cDeF-0123-456789AbCdE", 35, from_chars_error::unexpected_end_of_input );
test( "@", 0, from_chars_error::hex_digit_expected );
test( L"@", 0, from_chars_error::hex_digit_expected );
test( u"@", 0, from_chars_error::hex_digit_expected );