Skip to content

Commit

Permalink
Fix assert in GetRomanNumeralCharValue (#1512)
Browse files Browse the repository at this point in the history
Should have been upper instead of lower. Not sure why CI didn't fail, unless it's only running tests against release?
  • Loading branch information
stephentoub authored May 30, 2024
1 parent d39cfda commit ed39e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Humanizer/RomanNumeralExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static class RomanNumeralExtensions

static int GetRomanNumeralCharValue(char c)
{
Debug.Assert(char.ToLowerInvariant(c) is 'M' or 'D' or 'C' or 'L' or 'X' or 'V' or 'I', "Invalid Roman numeral character");
Debug.Assert(char.ToUpperInvariant(c) is 'M' or 'D' or 'C' or 'L' or 'X' or 'V' or 'I', "Invalid Roman numeral character");
return (c & ~0x20) switch
{
'M' => 1000,
Expand Down

0 comments on commit ed39e05

Please sign in to comment.