Browse Source

Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets

git-svn-id: trunk@38757 -
pierre 7 years ago
parent
commit
52b830a434
3 changed files with 48 additions and 31 deletions
  1. 18 16
      tests/tbs/tb0462.pp
  2. 15 8
      tests/tbs/tb0488a.pp
  3. 15 7
      tests/tbs/tb0488b.pp

+ 18 - 16
tests/tbs/tb0462.pp

@@ -1,26 +1,28 @@
 { %version=1.1 }
 
 {$ifdef go32v2}
-  {$define USE_FPWIDESTRING_UNIT}
-  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_INTERNAL_UNICODE}
 {$endif}
 
-{$ifdef fpc}
-{$ifdef unix}
-  {$ifdef darwin}
-uses
-  iosxwstr;
-  {$else}
-uses
-  cwstring;
-  {$endif}
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
 {$endif}
-{$ifdef go32v2}
 uses
-    fpwidestring,
-    unicodeducet;
-{$endif}
-{$endif}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  strings;
 
 type
   RR = record

+ 15 - 8
tests/tbs/tb0488a.pp

@@ -31,21 +31,28 @@
 {$Q-}
 
 {$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
   {$define USE_FPWIDESTRING_UNIT}
   {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
 {$endif}
-
 uses
-{$ifdef unix}
+ {$ifndef USE_INTERNAL_UNICODE}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
-SysUtils,erroru;
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  SysUtils,erroru;
 
 procedure Check(a,b:ansistring);
 begin

+ 15 - 7
tests/tbs/tb0488b.pp

@@ -3,20 +3,28 @@
 }
 
 {$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
   {$define USE_FPWIDESTRING_UNIT}
   {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
 {$endif}
 uses
-{$ifdef unix}
+ {$ifndef USE_INTERNAL_UNICODE}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
-SysUtils,erroru;
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  SysUtils,erroru;
 
 procedure Check(a,b:ansistring);
 begin