Browse Source

* Skip all surrogate values in for loops from low(word) to high(word)

git-svn-id: trunk@40560 -
pierre 6 năm trước cách đây
mục cha
commit
0846456ce4
32 tập tin đã thay đổi với 84 bổ sung56 xóa
  1. 3 1
      tests/test/units/character/tgetnumericvalue.pp
  2. 3 1
      tests/test/units/character/tgetnumericvalue2.pp
  3. 1 1
      tests/test/units/character/tgetnumericvalue3.pp
  4. 1 1
      tests/test/units/character/tgetunicodecategoriesurro.pp
  5. 3 1
      tests/test/units/character/tiscontrol.pp
  6. 3 1
      tests/test/units/character/tiscontrol2.pp
  7. 1 1
      tests/test/units/character/tiscontrol3.pp
  8. 3 1
      tests/test/units/character/tisdigit.pp
  9. 3 1
      tests/test/units/character/tisdigit2.pp
  10. 1 1
      tests/test/units/character/tisdigit3.pp
  11. 1 6
      tests/test/units/character/tishighsurrogate.pp
  12. 5 1
      tests/test/units/character/tisletter.pp
  13. 5 1
      tests/test/units/character/tisletterordigit.pp
  14. 1 6
      tests/test/units/character/tislowsurrogate.pp
  15. 3 1
      tests/test/units/character/tisnumber.pp
  16. 3 1
      tests/test/units/character/tisnumber2.pp
  17. 3 1
      tests/test/units/character/tispunctuation.pp
  18. 5 1
      tests/test/units/character/tisseparator.pp
  19. 1 1
      tests/test/units/character/tissurrogate.pp
  20. 1 8
      tests/test/units/character/tissurrogatepair.pp
  21. 1 8
      tests/test/units/character/tissurrogatepair2.pp
  22. 5 1
      tests/test/units/character/tissymbol.pp
  23. 5 1
      tests/test/units/character/tisupper.pp
  24. 3 1
      tests/test/units/character/tiswhitespace.pp
  25. 5 1
      tests/test/units/character/tlowercase.pp
  26. 5 1
      tests/test/units/character/tlowercase2.pp
  27. 3 1
      tests/test/units/character/ttolower.pp
  28. 1 1
      tests/test/units/character/ttolower2.pp
  29. 1 1
      tests/test/units/character/ttolower3.pp
  30. 3 1
      tests/test/units/character/ttoupper.pp
  31. 1 1
      tests/test/units/character/ttoupper2.pp
  32. 1 1
      tests/test/units/character/ttoupper3.pp

+ 3 - 1
tests/test/units/character/tgetnumericvalue.pp

@@ -12,7 +12,7 @@ program tgetnumericvalue;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -44,6 +44,8 @@ begin
   e := 1;
   k := 0;
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
           [ TUnicodeCategory.ucDecimalNumber,

+ 3 - 1
tests/test/units/character/tgetnumericvalue2.pp

@@ -12,7 +12,7 @@ program tgetnumericvalue2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -54,6 +54,8 @@ begin
   e := 1;
   k := 0;
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := strPrefix + UnicodeChar(i) + strPrefix;
     if (TCharacter.GetUnicodeCategory(uc,locCharPos) in
           [ TUnicodeCategory.ucDecimalNumber,

+ 1 - 1
tests/test/units/character/tgetnumericvalue3.pp

@@ -12,7 +12,7 @@ program tgetnumericvalue3;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 1 - 1
tests/test/units/character/tgetunicodecategoriesurro.pp

@@ -12,7 +12,7 @@ program tgetunicodecategoriesurro;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 3 - 1
tests/test/units/character/tiscontrol.pp

@@ -12,7 +12,7 @@ program tiscontrol;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -56,6 +56,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) = TUnicodeCategory.ucControl) then begin
       if not TCharacter.IsControl(uc) then

+ 3 - 1
tests/test/units/character/tiscontrol2.pp

@@ -12,7 +12,7 @@ program tiscontrol2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -59,6 +59,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := strPrefix + UnicodeChar(i) + strPrefix;
     if (TCharacter.GetUnicodeCategory(uc,locCharPos) = TUnicodeCategory.ucControl) then begin
       if not TCharacter.IsControl(uc,locCharPos) then

+ 1 - 1
tests/test/units/character/tiscontrol3.pp

@@ -12,7 +12,7 @@ program tisdigit3;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 3 - 1
tests/test/units/character/tisdigit.pp

@@ -12,7 +12,7 @@ program tisdigit;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -49,6 +49,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) = TUnicodeCategory.ucDecimalNumber) then begin
       if not TCharacter.IsDigit(uc) then

+ 3 - 1
tests/test/units/character/tisdigit2.pp

@@ -12,7 +12,7 @@ program tisdigit2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -52,6 +52,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := strPrefix + UnicodeChar(i) + strPrefix;
     if (TCharacter.GetUnicodeCategory(uc,locCharPos) = TUnicodeCategory.ucDecimalNumber) then begin
       if not TCharacter.IsDigit(uc,locCharPos) then

+ 1 - 1
tests/test/units/character/tisdigit3.pp

@@ -12,7 +12,7 @@ program tgetnumericvalue3;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 1 - 6
tests/test/units/character/tishighsurrogate.pp

@@ -12,7 +12,7 @@ program tishighsurrogate;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -36,11 +36,6 @@ begin
   Halt(Acode);
 end;         
 
-const
-  LOW_SURROGATE_BEGIN  = Word($DC00);
-  LOW_SURROGATE_END    = Word($DFFF);
-  HIGH_SURROGATE_BEGIN = Word($D800);
-  HIGH_SURROGATE_END   = Word($DBFF);
 var
   e, i , k: Integer;
   uc : UnicodeChar;

+ 5 - 1
tests/test/units/character/tisletter.pp

@@ -12,7 +12,7 @@ program tisletter;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -56,6 +56,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
           [ TUnicodeCategory.ucUppercaseLetter, TUnicodeCategory.ucLowercaseLetter,
@@ -78,6 +80,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if not (TCharacter.GetUnicodeCategory(uc) in
               [ TUnicodeCategory.ucUppercaseLetter, TUnicodeCategory.ucLowercaseLetter,

+ 5 - 1
tests/test/units/character/tisletterordigit.pp

@@ -12,7 +12,7 @@ program tisletterordigit;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -63,6 +63,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
           [ TUnicodeCategory.ucUppercaseLetter, TUnicodeCategory.ucLowercaseLetter,
@@ -79,6 +81,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if not (TCharacter.GetUnicodeCategory(uc) in
               [ TUnicodeCategory.ucUppercaseLetter, TUnicodeCategory.ucLowercaseLetter,

+ 1 - 6
tests/test/units/character/tislowsurrogate.pp

@@ -12,7 +12,7 @@ program tislowsurrogate;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -36,11 +36,6 @@ begin
   Halt(Acode);
 end;         
 
-const
-  LOW_SURROGATE_BEGIN  = Word($DC00);
-  LOW_SURROGATE_END    = Word($DFFF);
-  HIGH_SURROGATE_BEGIN = Word($D800);
-  HIGH_SURROGATE_END   = Word($DBFF);
 var
   e, i , k: Integer;
   uc : UnicodeChar;

+ 3 - 1
tests/test/units/character/tisnumber.pp

@@ -12,7 +12,7 @@ program tisnumber;
   
 uses     
   SysUtils,
-  character;
+  unicodedata, character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -44,6 +44,8 @@ begin
   e := 1;
   k := 0;
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if TCharacter.IsNumber(uc) then begin
       WriteLn('CodePoint = ',IntToHex(Ord(uc),4), ' ; IsNumber = ',TCharacter.IsNumber(uc));

+ 3 - 1
tests/test/units/character/tisnumber2.pp

@@ -12,7 +12,7 @@ program tisnumber2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -47,6 +47,8 @@ begin
   e := 1;
   k := 0;
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := strPrefix + UnicodeChar(i) + strPrefix;
     if TCharacter.IsNumber(uc,locCharPos) then begin
       WriteLn('CodePoint = ',IntToHex(Ord(uc[locCharPos]),4), ' ; IsNumber = ',TCharacter.IsNumber(uc,locCharPos));

+ 3 - 1
tests/test/units/character/tispunctuation.pp

@@ -12,7 +12,7 @@ program tispunctuation;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -80,6 +80,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
         [ TUnicodeCategory.ucConnectPunctuation, TUnicodeCategory.ucDashPunctuation,

+ 5 - 1
tests/test/units/character/tisseparator.pp

@@ -12,7 +12,7 @@ program tisseparator;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -60,6 +60,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
         [ TUnicodeCategory.ucSpaceSeparator,
@@ -75,6 +77,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if not (TCharacter.GetUnicodeCategory(uc) in
             [ TUnicodeCategory.ucSpaceSeparator,

+ 1 - 1
tests/test/units/character/tissurrogate.pp

@@ -12,7 +12,7 @@ program tissurrogate;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 1 - 8
tests/test/units/character/tissurrogatepair.pp

@@ -12,7 +12,7 @@ program tissurrogatepair;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -28,13 +28,6 @@ begin
   Halt(Acode);
 end;
 
-const
-  LOW_SURROGATE_BEGIN  = Word($DC00);
-  LOW_SURROGATE_END    = Word($DFFF);
-
-  HIGH_SURROGATE_BEGIN = Word($D800);
-  HIGH_SURROGATE_END   = Word($DBFF);
-
 var
   e, i , j: Integer;
 begin  

+ 1 - 8
tests/test/units/character/tissurrogatepair2.pp

@@ -12,7 +12,7 @@ program tissurrogatepair2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -28,13 +28,6 @@ begin
   Halt(Acode);
 end;
 
-const
-  LOW_SURROGATE_BEGIN  = Word($DC00);
-  LOW_SURROGATE_END    = Word($DFFF);
-
-  HIGH_SURROGATE_BEGIN = Word($D800);
-  HIGH_SURROGATE_END   = Word($DBFF);
-
 var
   e, i , j: Integer;
   s : UnicodeString;

+ 5 - 1
tests/test/units/character/tissymbol.pp

@@ -12,7 +12,7 @@ program tissymbol;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -89,6 +89,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
         [ TUnicodeCategory.ucMathSymbol,
@@ -105,6 +107,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if not (TCharacter.GetUnicodeCategory(uc) in
             [ TUnicodeCategory.ucMathSymbol,

+ 5 - 1
tests/test/units/character/tisupper.pp

@@ -12,7 +12,7 @@ program tisupper;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -56,6 +56,8 @@ begin
   
   Inc(e);     
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i); 
     if (TCharacter.GetUnicodeCategory(uc) = TUnicodeCategory.ucUppercaseLetter) then begin
       if not TCharacter.IsUpper(uc) then
@@ -65,6 +67,8 @@ begin
   
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i); 
     if (TCharacter.GetUnicodeCategory(uc) <> TUnicodeCategory.ucUppercaseLetter) then begin
       if TCharacter.IsUpper(uc) then

+ 3 - 1
tests/test/units/character/tiswhitespace.pp

@@ -12,7 +12,7 @@ program tiswhitespace;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -86,6 +86,8 @@ begin
 
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i);
     if (TCharacter.GetUnicodeCategory(uc) in
         [ TUnicodeCategory.ucSpaceSeparator,

+ 5 - 1
tests/test/units/character/tlowercase.pp

@@ -12,7 +12,7 @@ program tlowercase;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -56,6 +56,8 @@ begin
   
   Inc(e);     
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i); 
     if (TCharacter.GetUnicodeCategory(uc) = TUnicodeCategory.ucLowercaseLetter) then begin
       if not TCharacter.IsLower(uc) then
@@ -65,6 +67,8 @@ begin
   
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i); 
     if (TCharacter.GetUnicodeCategory(uc) <> TUnicodeCategory.ucLowercaseLetter) then begin
       if TCharacter.IsLower(uc) then

+ 5 - 1
tests/test/units/character/tlowercase2.pp

@@ -12,7 +12,7 @@ program tlowercase2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -65,6 +65,8 @@ begin
   
   Inc(e);     
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := strPrefix + UnicodeChar(i) + strPrefix;
     if (TCharacter.GetUnicodeCategory(uc,locCharPos) = TUnicodeCategory.ucLowercaseLetter) then begin
       if not TCharacter.IsLower(uc,locCharPos) then
@@ -74,6 +76,8 @@ begin
   
   Inc(e);
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := strPrefix + UnicodeChar(i) + strPrefix;
     if (TCharacter.GetUnicodeCategory(uc,locCharPos) <> TUnicodeCategory.ucLowercaseLetter) then begin
       if TCharacter.IsLower(uc,locCharPos) then

+ 3 - 1
tests/test/units/character/ttolower.pp

@@ -12,7 +12,7 @@ program ttolower;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -65,6 +65,8 @@ begin
   
   Inc(e);     
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i); 
     if (TCharacter.GetUnicodeCategory(uc) = TUnicodeCategory.ucLowercaseLetter) then begin
       if (TCharacter.ToLower(uc) <> uc) then

+ 1 - 1
tests/test/units/character/ttolower2.pp

@@ -12,7 +12,7 @@ program ttolower2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 1 - 1
tests/test/units/character/ttolower3.pp

@@ -12,7 +12,7 @@ program ttolower3;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 3 - 1
tests/test/units/character/ttoupper.pp

@@ -12,7 +12,7 @@ program ttoupper;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   
@@ -65,6 +65,8 @@ begin
   
   Inc(e);     
   for i := Low(Word) to High(Word) do begin
+    { Skip all surrogate values }
+    if (i>=HIGH_SURROGATE_BEGIN) and (i<=LOW_SURROGATE_END) then continue;
     uc := UnicodeChar(i); 
     if (TCharacter.GetUnicodeCategory(uc) = TUnicodeCategory.ucUppercaseLetter) then begin
       if (TCharacter.ToUpper(uc) <> uc) then

+ 1 - 1
tests/test/units/character/ttoupper2.pp

@@ -12,7 +12,7 @@ program ttoupper2;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;   

+ 1 - 1
tests/test/units/character/ttoupper3.pp

@@ -12,7 +12,7 @@ program ttoupper3;
   
 uses     
   SysUtils,
-  character;
+  unicodedata,character;
     
 {$ifndef FPC}
   type UnicodeChar = WideChar;