@@ -41,13 +41,17 @@ public void GetUnicodeCategory_CompareWithDotNet()
4141 {
4242 Console . WriteLine ( $ "GetUnicodeCategory doesn't match for character { ( ( UCodepoint ) c ) . ToHexString ( ) } - " +
4343 $ ".Net: { dotNetCategory } , Found: { uCat } ") ;
44- Assert . AreEqual ( UnicodeCategory . OtherNotAssigned , dotNetCategory ) ;
44+ if ( c != '\u0295 ' ) // This was changed from lower to other in Unicode 17.
45+ {
46+ Assert . AreEqual ( UnicodeCategory . OtherNotAssigned , dotNetCategory ,
47+ "Did Unicode change the category of a codepoint?" ) ;
48+ }
4549
4650 incorrectCount ++ ;
4751 }
4852 }
4953
50- Assert . That . IsLessThanOrEqualTo ( incorrectCount , 22 , "Unexpected number of differences from .Net" ) ;
54+ Assert . That . IsLessThanOrEqualTo ( incorrectCount , 85 , "Unexpected number of differences from .Net" ) ;
5155 }
5256 #endregion
5357
@@ -102,11 +106,12 @@ public void IsUpper_CompareWithDotNet()
102106 {
103107 Console . WriteLine ( $ "IsUpper doesn't match for character { ( ( UCodepoint ) c ) . ToHexString ( ) } - " +
104108 $ ".Net: { dotNetIsUpper } , Found: { isUpper } ") ;
109+ Assert . IsFalse ( dotNetIsUpper , "Did Unicode change a letter to not be a letter?" ) ;
105110 incorrectCount ++ ;
106111 }
107112 }
108113
109- Assert . That . IsLessThanOrEqualTo ( incorrectCount , 5 , "Unexpected number of differences from .Net" ) ;
114+ Assert . That . IsLessThanOrEqualTo ( incorrectCount , 8 , "Unexpected number of differences from .Net" ) ;
110115 }
111116 #endregion
112117
@@ -174,11 +179,13 @@ public void IsLower_CompareWithDotNet()
174179 {
175180 Console . WriteLine ( $ "IsLower doesn't match for character { ( ( UCodepoint ) c ) . ToHexString ( ) } - " +
176181 $ ".Net: { dotNetIsLower } , Found: { isLower } ") ;
182+ if ( c != '\u0295 ' ) // This was changed from lower to other in Unicode 17.
183+ Assert . IsFalse ( dotNetIsLower , "Did Unicode change a letter to not be a letter?" ) ;
177184 incorrectCount ++ ;
178185 }
179186 }
180187
181- Assert . That . IsLessThanOrEqualTo ( incorrectCount , 3 , "Unexpected number of differences from .Net" ) ;
188+ Assert . That . IsLessThanOrEqualTo ( incorrectCount , 5 , "Unexpected number of differences from .Net" ) ;
182189 }
183190 #endregion
184191
@@ -347,11 +354,12 @@ public void IsLetter_CompareWithDotNet()
347354 {
348355 Console . WriteLine ( $ "IsLetter doesn't match for character { ( ( UCodepoint ) c ) . ToHexString ( ) } - " +
349356 $ ".Net: { dotNetIsLetter } , Found: { isLetter } ") ;
357+ Assert . IsFalse ( dotNetIsLetter , "Did Unicode change a letter to no longer be a letter?" ) ;
350358 incorrectCount ++ ;
351359 }
352360 }
353361
354- Assert . That . IsLessThanOrEqualTo ( incorrectCount , 8 , "Unexpected number of differences from .Net" ) ;
362+ Assert . That . IsLessThanOrEqualTo ( incorrectCount , 16 , "Unexpected number of differences from .Net" ) ;
355363 }
356364 #endregion
357365
@@ -459,11 +467,12 @@ public void IsSymbol_CompareWithDotNet()
459467 {
460468 Console . WriteLine ( $ "IsSymbol doesn't match for character { ( ( UCodepoint ) c ) . ToHexString ( ) } - " +
461469 $ ".Net: { dotNetIsSymbol } , Found: { isSymbol } ") ;
470+ Assert . IsFalse ( dotNetIsSymbol , "Did Unicode change a symbol to no longer be a symbol?" ) ;
462471 incorrectCount ++ ;
463472 }
464473 }
465474
466- Assert . That . IsLessThanOrEqualTo ( incorrectCount , 10 , "Unexpected number of differences from .Net" ) ;
475+ Assert . That . IsLessThanOrEqualTo ( incorrectCount , 37 , "Unexpected number of differences from .Net" ) ;
467476 }
468477 #endregion
469478
@@ -566,11 +575,13 @@ public void IsLetterOrDigit_CompareWithDotNet()
566575 {
567576 Console . WriteLine ( $ "IsLetterOrDigit doesn't match for character { ( ( UCodepoint ) c ) . ToHexString ( ) } - " +
568577 $ ".Net: { dotNetIsLetterOrDigit } , Found: { isLetterOrDigit } ") ;
578+ Assert . IsFalse ( dotNetIsLetterOrDigit ,
579+ "Did Unicode change a letter or digit to no longer be a letter or digit?" ) ;
569580 incorrectCount ++ ;
570581 }
571582 }
572583
573- Assert . That . IsLessThanOrEqualTo ( incorrectCount , 8 , "Unexpected number of differences from .Net" ) ;
584+ Assert . That . IsLessThanOrEqualTo ( incorrectCount , 16 , "Unexpected number of differences from .Net" ) ;
574585 }
575586 #endregion
576587
0 commit comments