From c9f15c906e157c0521627d45898706ec55134821 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 12 Apr 2018 12:53:20 +0000 Subject: [PATCH] Add units required for wide strings support for go32v2 target git-svn-id: trunk@38740 - --- tests/webtbs/tw15504.pp | 27 +++++++++++++++++++++++++-- tests/webtbs/tw19701.pp | 28 +++++++++++++++++++++++++++- tests/webtbs/tw20962.pp | 27 ++++++++++++++++++++++++++- tests/webtbs/tw30119a.pp | 2 +- tests/webtbs/tw30119b.pp | 2 +- tests/webtbs/tw30639.pp | 28 +++++++++++++++++++++++++--- 6 files changed, 105 insertions(+), 9 deletions(-) diff --git a/tests/webtbs/tw15504.pp b/tests/webtbs/tw15504.pp index 8dcd22e7e7..f7ed02a728 100644 --- a/tests/webtbs/tw15504.pp +++ b/tests/webtbs/tw15504.pp @@ -3,10 +3,33 @@ program strtest; {$MODE OBJFPC} {$LONGSTRINGS ON} -{$ifdef unix} -uses CWstring; +{$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 ndef USE_INTERNAL_UNICODE} +{$endif unix} + {$ifdef USE_FPWIDESTRING_UNIT} + fpwidestring, + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} + unicodeducet, + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} + Strings; + type tEnum = (North, East, South, West); diff --git a/tests/webtbs/tw19701.pp b/tests/webtbs/tw19701.pp index 2029f3dc5d..56c6fca18c 100644 --- a/tests/webtbs/tw19701.pp +++ b/tests/webtbs/tw19701.pp @@ -1,10 +1,36 @@ { %opt=-gh } +{$ifdef go32v2} + {$define USE_INTERNAL_UNICODE} +{$endif} + +{$ifdef USE_INTERNAL_UNICODE} + {$define USE_FPWIDESTRING_UNIT} + {$define USE_UNICODEDUCET_UNIT} + {$define USE_CPALL_UNIT} +{$endif} + program tw19701; {$ifdef FPC}{$mode objfpc}{$h+}{$endif} {$ifdef mswindows}{$apptype console}{$endif} uses - {$ifdef FPC}{$ifdef linux}cthreads,cwstring,{$endif}{$endif} + {$ifdef FPC} + {$ifdef linux} + cthreads, + {$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} sysutils,uw19701; begin HaltOnNotReleased:=True; diff --git a/tests/webtbs/tw20962.pp b/tests/webtbs/tw20962.pp index 060403d4da..3d7a00e2c4 100644 --- a/tests/webtbs/tw20962.pp +++ b/tests/webtbs/tw20962.pp @@ -1,10 +1,35 @@ { %opt=-gh } +{$ifdef go32v2} + {$define USE_INTERNAL_UNICODE} +{$endif} + +{$ifdef USE_INTERNAL_UNICODE} + {$define USE_FPWIDESTRING_UNIT} + {$define USE_UNICODEDUCET_UNIT} + {$define USE_CPALL_UNIT} +{$endif} program outpar; {$ifdef FPC}{$mode objfpc}{$h+}{$endif} {$ifdef mswindows}{$apptype console}{$endif} uses - {$ifdef FPC}{$ifdef unix}cthreads,{$ifdef darwin}iosxwstr{$else}cwstring{$endif},{$endif}{$endif} + {$ifdef FPC} + {$ifdef unix} + cthreads, + {$ifndef USE_INTERNAL_UNICODE} + {$ifdef darwin}iosxwstr{$else}cwstring{$endif}, + {$endif ndef USE_INTERNAL_UNICODE} + {$endif} + {$endif} + {$ifdef USE_FPWIDESTRING_UNIT} + fpwidestring, + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} + unicodeducet, + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} sysutils; {$ifndef FPC} type diff --git a/tests/webtbs/tw30119a.pp b/tests/webtbs/tw30119a.pp index 7b86bd4220..02c2ddcbbb 100644 --- a/tests/webtbs/tw30119a.pp +++ b/tests/webtbs/tw30119a.pp @@ -7,7 +7,7 @@ program tw30119; // fkdane, // fkrecord; //uses -// cwstring; +// cwstringdisabled; {$H+} diff --git a/tests/webtbs/tw30119b.pp b/tests/webtbs/tw30119b.pp index 8e02d3774f..d6b512d59c 100644 --- a/tests/webtbs/tw30119b.pp +++ b/tests/webtbs/tw30119b.pp @@ -7,7 +7,7 @@ program tw30119; // fkdane, // fkrecord; //uses -// cwstring; +// cwstringdisabled; {$H+} diff --git a/tests/webtbs/tw30639.pp b/tests/webtbs/tw30639.pp index ad041f2605..e2b31d4f68 100644 --- a/tests/webtbs/tw30639.pp +++ b/tests/webtbs/tw30639.pp @@ -4,10 +4,32 @@ program cp; {$h+} {$codepage utf8} +{$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 - SysUtils - {$ifdef unix}, cwstring - {$endif}; +{$ifdef unix} + {$ifndef USE_INTERNAL_UNICODE} + {$ifdef darwin}iosxwstr{$else}cwstring{$endif}, + {$endif ndef USE_INTERNAL_UNICODE} +{$endif unix} + {$ifdef USE_FPWIDESTRING_UNIT} + fpwidestring, + {$endif} + {$ifdef USE_UNICODEDUCET_UNIT} + unicodeducet, + {$endif} + {$ifdef USE_CPALL_UNIT} + cpall, + {$endif} + SysUtils; type string1252 = type ansistring(1252);