From edaa0b30142a70ede3a16a4e16b0ed9072844a46 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 17 Sep 2011 18:19:47 +0000 Subject: [PATCH] * changing tests to fix regressions is only the last resort, so this should be sorted out by other means, r19116 reverted --- Reverse-merging r19116 into '.': U tests\webtbs\tw4675.pp U tests\webtbs\tw7758.pp U tests\webtbs\tw18702.pp U tests\webtbs\tw3595.pp U tests\webtbs\tw5001.pp U tests\webtbs\tw2250.pp U tests\webtbs\tw3492.pp U tests\webtbs\tw16004.pp G . --- Recording mergeinfo for reverse merge of r19116 into '.': G . git-svn-id: trunk@19135 - --- tests/webtbs/tw16004.pp | 16 ++++++++-------- tests/webtbs/tw18702.pp | 5 ----- tests/webtbs/tw2250.pp | 5 ----- tests/webtbs/tw3492.pp | 5 ----- tests/webtbs/tw3595.pp | 14 ++++++-------- tests/webtbs/tw4675.pp | 5 ----- tests/webtbs/tw5001.pp | 5 ----- tests/webtbs/tw7758.pp | 2 +- 8 files changed, 15 insertions(+), 42 deletions(-) diff --git a/tests/webtbs/tw16004.pp b/tests/webtbs/tw16004.pp index 08b7c5e809..bf16a89291 100644 --- a/tests/webtbs/tw16004.pp +++ b/tests/webtbs/tw16004.pp @@ -11,7 +11,7 @@ begin end; procedure foo; - var a: array[0..5] of ansichar = 'willow'; + var a: array[0..5] of char = 'willow'; const b: array[0..2] of WideChar = 'èâà'; begin assert( verify(a, sizeof(a), [ord('w'), ord('i'), ord('l'), ord('l'), ord('o'), ord('w')]) ); @@ -22,12 +22,12 @@ end; {$endif} end; -const c: array[0..9] of ansichar = 'rosenberg'; +const c: array[0..10] of char = 'rosenberg'; var d: array[0..10] of WideChar = 'ðîçåíáåðã'; - z: array[0..0] of WideChar = 'û'; - x: array[0..0] of ansichar = 'x'; + z: array[0..1] of WideChar = 'û'; + x: array[0..0] of char = 'x'; begin - assert( verify(c, sizeof(c), [114, 111, 115, 101, 110, 98, 101, 114, 103, 0]) ); + assert( verify(c, sizeof(c), [114, 111, 115, 101, 110, 98, 101, 114, 103, 0, 0]) ); {$ifdef endian_big} assert( verify(d, sizeof(d), [$04,$40,$04,$3E,$04,$37,$04,$35,$04,$3D,$04,$31,$04,$35,$04,$40,$04,$33,0,0,0,0]) ); {$else} @@ -35,9 +35,9 @@ begin {$endif} foo; {$ifdef endian_big} - assert( verify(z, sizeof(z), [$04,$4B]) ); + assert( verify(z, sizeof(z), [$04,$4B,0,0]) ); {$else} - assert( verify(z, sizeof(z), [$4B,$04]) ); + assert( verify(z, sizeof(z), [$4B,$04,0,0]) ); {$endif} assert( verify(x, sizeof(x), [120]) ) -end. +end. \ No newline at end of file diff --git a/tests/webtbs/tw18702.pp b/tests/webtbs/tw18702.pp index 8cd2305205..69a54be3bc 100644 --- a/tests/webtbs/tw18702.pp +++ b/tests/webtbs/tw18702.pp @@ -2,11 +2,6 @@ program project1; {$mode objfpc}{$H+} {$modeswitch nestedprocvars} -uses -{$ifdef unix} - cwstring, -{$endif unix} - SysUtils; type TGetSQLTextProc = function() : string is nested; diff --git a/tests/webtbs/tw2250.pp b/tests/webtbs/tw2250.pp index 8e150aea57..c1fc93de9e 100644 --- a/tests/webtbs/tw2250.pp +++ b/tests/webtbs/tw2250.pp @@ -1,11 +1,6 @@ { Source provided for Free Pascal Bug Report 2250 } { Submitted by "Konstantin Seiler" on 2002-12-04 } { e-mail: list@kseiler.de } -uses -{$ifdef unix} - cwstring, -{$endif unix} - SysUtils; procedure stringbug; var env:ansistring; procedure addenv(s:ansistring); diff --git a/tests/webtbs/tw3492.pp b/tests/webtbs/tw3492.pp index a17bdc17d0..a56788143f 100644 --- a/tests/webtbs/tw3492.pp +++ b/tests/webtbs/tw3492.pp @@ -1,9 +1,4 @@ {$mode fpc} -uses -{$ifdef unix} - cwstring, -{$endif unix} - SysUtils; resourcestring s = 'OK'; diff --git a/tests/webtbs/tw3595.pp b/tests/webtbs/tw3595.pp index 03c7341312..5e4797e4c9 100644 --- a/tests/webtbs/tw3595.pp +++ b/tests/webtbs/tw3595.pp @@ -54,10 +54,10 @@ begin filestream.free; -// try + try filestream:= tfilestream.create(textfilename,fmopenread); memstream:= tmemorystream.create; -// try + try objecttexttobinary(filestream,memstream); writeln('objecttexttobinary OK'); try @@ -80,21 +80,19 @@ begin halt(1); end; end; -{ except + except on e: exception do begin writeln('objecttexttobinary fails: '+e.message); - halt(1); end; end; -} filestream.free; + filestream.free; memstream.free; -{ -except + except writeln('file '+textfilename+' not found.'); halt(1); end; -} test1.free; + test1.free; test2.free; deletefile(textfilename); end. diff --git a/tests/webtbs/tw4675.pp b/tests/webtbs/tw4675.pp index e81fe87c87..395acd0e9a 100644 --- a/tests/webtbs/tw4675.pp +++ b/tests/webtbs/tw4675.pp @@ -6,11 +6,6 @@ program Project1; {$mode objfpc}{$H+} -uses -{$ifdef unix} - cwstring, -{$endif unix} - SysUtils; function GotHint_WantNoHint: string; procedure Add(const s: string); diff --git a/tests/webtbs/tw5001.pp b/tests/webtbs/tw5001.pp index 33489aba63..d67977afc5 100644 --- a/tests/webtbs/tw5001.pp +++ b/tests/webtbs/tw5001.pp @@ -4,11 +4,6 @@ program Project1; {$mode objfpc}{$H+} -uses -{$ifdef unix} - cwstring, -{$endif unix} - SysUtils; resourcestring s = 'test'; diff --git a/tests/webtbs/tw7758.pp b/tests/webtbs/tw7758.pp index 7819c92940..56b1424987 100644 --- a/tests/webtbs/tw7758.pp +++ b/tests/webtbs/tw7758.pp @@ -11,7 +11,7 @@ const c2=widechar('é'); c3=widestring('é'); var - c: ansichar; + c: char; wc,wc2: widechar; s,s2,a: ansistring; w: widestring;