From ed39e0571a9a33ad31f4c327c2bf579409164e1b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 30 May 2024 08:41:06 -0400 Subject: [PATCH] Fix assert in GetRomanNumeralCharValue (#1512) Should have been upper instead of lower. Not sure why CI didn't fail, unless it's only running tests against release? --- src/Humanizer/RomanNumeralExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Humanizer/RomanNumeralExtensions.cs b/src/Humanizer/RomanNumeralExtensions.cs index 6b6f91533..cfd48e70f 100644 --- a/src/Humanizer/RomanNumeralExtensions.cs +++ b/src/Humanizer/RomanNumeralExtensions.cs @@ -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,