Skip to content

Commit

Permalink
add tests for unsigned integers with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
phlptp committed Jan 13, 2025
1 parent de7c90c commit e2dbad5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/OptionTypeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ TEST_CASE_METHOD(TApp, "intConversionsErange", "[optiontype]") {
static const std::map<std::string, std::uint64_t> testValuesUInt{
{"+99", 99},
{"99", 99},
{" 99 ", 99},
{"0xDEADBEEF", 0xDEADBEEF},
{"0xdeadbeef", 0xDEADBEEF},
{"0XDEADBEEF", 0xDEADBEEF},
Expand All @@ -337,13 +338,16 @@ static const std::map<std::string, std::uint64_t> testValuesUInt{
{"0xdead'beef", 0xDEADBEEF},
{"0o01234567", 001234567},
{"0o755", 0755},
{"0o755\t", 0755},
{"0755", 0755},
{"995862_262", 995862262},
{"995862262", 995862262},
{"+995862275", +995862275},
{"+995862275 \n\t", +995862275},
{"995'862'275", 995862275},
{"0b11010110", 0xD6},
{"0b1101'0110", 0xD6},
{"0b1101'0110 ", 0xD6},
{"0B11010110", 0xD6},
{"0B1101'0110", 0xD6},
{"1_2_3_4_5", 12345},
Expand Down

0 comments on commit e2dbad5

Please sign in to comment.