From 95e609cc56b13c93a0ed0cb47c110de4e852d865 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 12 Apr 2018 20:36:31 +0000 Subject: [PATCH] Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets git-svn-id: trunk@38756 - --- tests/webtbs/tw10482.pp | 20 ++++++++++++++------ tests/webtbs/tw11791.pp | 27 ++++++++++++++++----------- tests/webtbs/tw12993.pp | 35 +++++++++++++++++++++++++---------- tests/webtbs/tw13015.pp | 22 +++++++++++++++------- tests/webtbs/tw13075.pp | 25 +++++++++++++++++-------- tests/webtbs/tw17591.pp | 26 +++++++++++++++++--------- tests/webtbs/tw25198.pp | 26 +++++++++++++++----------- tests/webtbs/tw3235a.pp | 27 ++++++++++++++++++--------- tests/webtbs/tw3697.pp | 20 +++++++++++++++----- tests/webtbs/tw4080.pp | 31 +++++++++++++++++++------------ tests/webtbs/tw7006.pp | 34 +++++++++++++++++++--------------- tests/webtbs/tw7758.pp | 22 ++++++++++++++-------- tests/webtbs/tw7758a.pp | 24 ++++++++++++++++-------- tests/webtbs/tw9161.pp | 20 ++++++++++++++------ 14 files changed, 234 insertions(+), 125 deletions(-) diff --git a/tests/webtbs/tw10482.pp b/tests/webtbs/tw10482.pp index 35d2c546a7..bf3bfbfccd 100644 --- a/tests/webtbs/tw10482.pp +++ b/tests/webtbs/tw10482.pp @@ -3,19 +3,27 @@ program fpctest4; {$mode delphi} {$endif fpc} {$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} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} Classes,sysutils,variants,typinfo; type diff --git a/tests/webtbs/tw11791.pp b/tests/webtbs/tw11791.pp index 55deac2c59..5e3665d15c 100644 --- a/tests/webtbs/tw11791.pp +++ b/tests/webtbs/tw11791.pp @@ -1,23 +1,28 @@ {$mode objfpc}{$H+} {$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} - {$ifdef darwin} - iosxwstr, - {$else} - cwstring, - {$endif} -{$endif} -{$ifdef USE_FPWIDESTRING_UNIT} + {$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} + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} unicodeducet, -{$endif} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} Classes, SysUtils; diff --git a/tests/webtbs/tw12993.pp b/tests/webtbs/tw12993.pp index 1ae69611dd..e7644a3ca4 100644 --- a/tests/webtbs/tw12993.pp +++ b/tests/webtbs/tw12993.pp @@ -1,20 +1,35 @@ {$codepage cp866} {$ifdef go32v2} + {$define USE_INTERNAL_UNICODE} +{$endif} +{$ifdef USE_INTERNAL_UNICODE} {$define USE_FPWIDESTRING_UNIT} {$define USE_UNICODEDUCET_UNIT} + {$define USE_CPALL_UNIT} +{$endif} + +{$ifndef USE_INTERNAL_UNICODE} + {$ifdef unix} + uses + {$ifdef darwin} + iosxwstr + {$else} + cwstring + {$endif}; + {$else def USE_INTERNAL_UNICODE} uses -{$ifdef USE_FPWIDESTRING_UNIT} + {$ifdef USE_FPWIDESTRING_UNIT} fpwidestring, -{$endif} -{$ifdef USE_UNICODEDUCET_UNIT} - unicodeducet; -{$endif} -{$endif} -{$ifdef unix} -uses - {$ifdef darwin}iosxwstr{$else}cwstring{$endif}; -{$endif} + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} + unicodeducet, + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} + strings; + {$endif ndef USE_INTERNAL_UNICODE} var s: ansistring; ws, ws3: widestring; diff --git a/tests/webtbs/tw13015.pp b/tests/webtbs/tw13015.pp index da2b5796c9..3955820fbf 100644 --- a/tests/webtbs/tw13015.pp +++ b/tests/webtbs/tw13015.pp @@ -8,20 +8,28 @@ program test; {$endif} {$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} - {$ifdef darwin}iosxwstr{$else}cwstring{$endif}, -{$endif} -{$ifdef USE_FPWIDESTRING_UNIT} + {$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} + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} unicodeducet, -{$endif} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} Classes,SysUtils,uw13015; procedure writefile(const fn: string); diff --git a/tests/webtbs/tw13075.pp b/tests/webtbs/tw13075.pp index cd260a0caa..3ec28eb79e 100644 --- a/tests/webtbs/tw13075.pp +++ b/tests/webtbs/tw13075.pp @@ -1,20 +1,29 @@ {$mode objfpc}{$H+} {$ifdef go32v2} - {$define USE_FPWIDESTRING_UNIT} - {$define USE_UNICODEDUCET_UNIT} + {$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} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} Classes, SysUtils; function localUnicodeToUTF8(u: cardinal; Buf: PChar): integer; diff --git a/tests/webtbs/tw17591.pp b/tests/webtbs/tw17591.pp index 26f66724bd..ed325d531c 100644 --- a/tests/webtbs/tw17591.pp +++ b/tests/webtbs/tw17591.pp @@ -2,21 +2,29 @@ program comparetext; {$ifdef FPC}{$mode objfpc}{$h+}{$endif} {$ifdef mswindows}{$apptype console}{$endif} {$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 USE_FPWIDESTRING_UNIT} + {$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} + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} unicodeducet, -{$endif} - sysutils -{$ifdef unix} - ,{$ifdef darwin}iosxwstr{$else}cwstring{$endif} -{$endif} -; + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} + sysutils; + var int1: integer; ustr1,ustr2: unicodestring; diff --git a/tests/webtbs/tw25198.pp b/tests/webtbs/tw25198.pp index e94832a943..e0c088efe8 100644 --- a/tests/webtbs/tw25198.pp +++ b/tests/webtbs/tw25198.pp @@ -2,23 +2,27 @@ program concatenate_resourestrings_delphiunicode; {$mode delphiunicode} {$codepage cp1250} -{$ifdef go32v2} +{$ifdef USE_INTERNAL_UNICODE} {$define USE_FPWIDESTRING_UNIT} {$define USE_UNICODEDUCET_UNIT} -uses -{$ifdef USE_FPWIDESTRING_UNIT} - fpwidestring, -{$endif} -{$ifdef USE_UNICODEDUCET_UNIT} - unicodeducet; + {$define USE_CPALL_UNIT} {$endif} -{$endif} - -{$ifdef unix} + {$ifndef USE_INTERNAL_UNICODE} uses {$ifdef darwin}iosxwstr{$else}cwstring{$endif}; -{$endif} + {$else USE_INTERNAL_UNICODE}a +uses + {$ifdef USE_FPWIDESTRING_UNIT} + fpwidestring, + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} + unicodeducet, + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall; + {$endif} + {$endif def USE_FPWIDESTRING_UNIT} resourcestring res2 = 'žluoučký ' + 'koníček'; diff --git a/tests/webtbs/tw3235a.pp b/tests/webtbs/tw3235a.pp index 9a1dcbd44d..3322b83352 100644 --- a/tests/webtbs/tw3235a.pp +++ b/tests/webtbs/tw3235a.pp @@ -1,19 +1,28 @@ program TestStrIComp; {$ifdef go32v2} - {$define USE_FPWIDESTRING_UNIT} - {$define USE_UNICODEDUCET_UNIT} + {$define USE_INTERNAL_UNICODE} {$endif} - uses -{$ifdef USE_FPWIDESTRING_UNIT} +{$ifdef USE_INTERNAL_UNICODE} + {$define USE_FPWIDESTRING_UNIT} + {$define USE_UNICODEDUCET_UNIT} + {$define USE_CPALL_UNIT} +{$endif} +uses + {$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} + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} unicodeducet, -{$endif} - {$ifdef unix}{$ifdef darwin}iosxwstr{$else}cwstring{$endif},{$endif} - SysUtils; + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} + SysUtils; var l: longint; begin diff --git a/tests/webtbs/tw3697.pp b/tests/webtbs/tw3697.pp index 255081175e..6a21b4002b 100644 --- a/tests/webtbs/tw3697.pp +++ b/tests/webtbs/tw3697.pp @@ -2,17 +2,27 @@ { Submitted by "Matthias Hryniszak" on 2005-02-26 } { e-mail: matthias@hryniszak.de } {$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}{$ifdef darwin}iosxwstr{$else}cwstring{$endif}, {$endif} -{$ifdef USE_FPWIDESTRING_UNIT} + {$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} + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} unicodeducet, -{$endif} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} SysUtils; var diff --git a/tests/webtbs/tw4080.pp b/tests/webtbs/tw4080.pp index 7d2d654705..eb807b55b6 100644 --- a/tests/webtbs/tw4080.pp +++ b/tests/webtbs/tw4080.pp @@ -1,21 +1,28 @@ program tw4080; {$i+} {$ifdef go32v2} - {$define USE_FPWIDESTRING_UNIT} - {$define USE_UNICODEDUCET_UNIT} -uses -{$ifdef USE_FPWIDESTRING_UNIT} - fpwidestring, -{$endif} -{$ifdef USE_UNICODEDUCET_UNIT} - unicodeducet; -{$endif} + {$define USE_INTERNAL_UNICODE} {$endif} -{$ifdef unix} +{$ifdef USE_INTERNAL_UNICODE} + {$define USE_FPWIDESTRING_UNIT} + {$define USE_UNICODEDUCET_UNIT} + {$define USE_CPALL_UNIT} +{$endif} uses - {$ifdef darwin}iosxwstr{$else}cwstring{$endif}; -{$endif unix} + {$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; var S, S2 : array [1..15] of char; diff --git a/tests/webtbs/tw7006.pp b/tests/webtbs/tw7006.pp index 9326c16c8d..a480c5c5bb 100644 --- a/tests/webtbs/tw7006.pp +++ b/tests/webtbs/tw7006.pp @@ -2,26 +2,30 @@ program av; {$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif} {$ifdef mswindows}{$apptype console}{$endif} {$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 FPC} - {$ifdef unix} + {$ifdef unix} cthreads, - {$ifdef darwin} - iosxwstr - {$else} - cwstring - {$endif} - ,{$endif} - {$ifdef USE_FPWIDESTRING_UNIT} - fpwidestring, - {$endif} - {$ifdef USE_UNICODEDUCET_UNIT} - unicodeducet, - {$endif} -{$endif} + {$endif unix} + {$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} sysutils; type testrecty = record diff --git a/tests/webtbs/tw7758.pp b/tests/webtbs/tw7758.pp index 43c7b60b42..154ea5a6c1 100644 --- a/tests/webtbs/tw7758.pp +++ b/tests/webtbs/tw7758.pp @@ -1,19 +1,25 @@ {$ifdef go32v2} + {$define USE_INTERNAL_UNICODE} +{$endif} + +{$ifdef USE_INTERNAL_UNICODE} {$define USE_FPWIDESTRING_UNIT} {$define USE_UNICODEDUCET_UNIT} + {$define USE_CPALL_UNIT} {$endif} -{$codepage utf8} - 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} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} sysutils; const diff --git a/tests/webtbs/tw7758a.pp b/tests/webtbs/tw7758a.pp index 39227f7d96..e4ab35c46a 100644 --- a/tests/webtbs/tw7758a.pp +++ b/tests/webtbs/tw7758a.pp @@ -1,19 +1,27 @@ { %norun } {$ifdef go32v2} - {$define use_fpwidestring_unit} - {$define use_unicodeducet_unit} + {$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} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} sysutils; { just to make sure that no all wide->shortstring compile time conversions } diff --git a/tests/webtbs/tw9161.pp b/tests/webtbs/tw9161.pp index e16c5a783e..88dd8bbf82 100644 --- a/tests/webtbs/tw9161.pp +++ b/tests/webtbs/tw9161.pp @@ -1,17 +1,25 @@ {$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} + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} variants,sysutils; var a:variant; x,y: array of byte;