Browse Source

merge r17487 from cpstrnew branch by michael:
* UPdates from inoussa

git-svn-id: trunk@19116 -

paul 14 years ago
parent
commit
cf77233a52

+ 8 - 8
tests/webtbs/tw16004.pp

@@ -11,7 +11,7 @@ begin
 end;
 
 	procedure foo;
-	var a: array[0..5] of char = 'willow';
+	var a: array[0..5] of ansichar = '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..10] of char = 'rosenberg';
+const c: array[0..9] of ansichar = 'rosenberg';
 var d: array[0..10] of WideChar = 'ðîçåíáåðã';
-	z: array[0..1] of WideChar = 'û';
-	x: array[0..0] of char = 'x';
+	z: array[0..0] of WideChar = 'û';
+	x: array[0..0] of ansichar = 'x';
 begin
-	assert( verify(c, sizeof(c), [114, 111, 115, 101, 110, 98, 101, 114, 103, 0, 0]) );
+	assert( verify(c, sizeof(c), [114, 111, 115, 101, 110, 98, 101, 114, 103, 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,0,0]) );
+	assert( verify(z, sizeof(z), [$04,$4B]) );
 {$else}
-	assert( verify(z, sizeof(z), [$4B,$04,0,0]) );
+	assert( verify(z, sizeof(z), [$4B,$04]) );
 {$endif}
 	assert( verify(x, sizeof(x), [120]) )
-end.
+end.

+ 5 - 0
tests/webtbs/tw18702.pp

@@ -2,6 +2,11 @@ program project1;
 
 {$mode objfpc}{$H+}
 {$modeswitch nestedprocvars}
+uses
+{$ifdef unix}
+  cwstring,
+{$endif unix}
+  SysUtils;
 
 type
   TGetSQLTextProc = function() : string is nested;

+ 5 - 0
tests/webtbs/tw2250.pp

@@ -1,6 +1,11 @@
 { Source provided for Free Pascal Bug Report 2250 }
 { Submitted by "Konstantin Seiler" on  2002-12-04 }
 { e-mail: [email protected] }
+uses
+{$ifdef unix}
+  cwstring,
+{$endif unix}
+  SysUtils;
 procedure stringbug;
 var env:ansistring;
   procedure addenv(s:ansistring);

+ 5 - 0
tests/webtbs/tw3492.pp

@@ -1,4 +1,9 @@
 {$mode fpc}
+uses
+{$ifdef unix}
+  cwstring,
+{$endif unix}
+  SysUtils;
 
 resourcestring
   s = 'OK';

+ 8 - 6
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,19 +80,21 @@ 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.

+ 5 - 0
tests/webtbs/tw4675.pp

@@ -6,6 +6,11 @@
 program Project1;
 
 {$mode objfpc}{$H+}
+uses
+{$ifdef unix}
+  cwstring,
+{$endif unix}
+  SysUtils;
 
 function GotHint_WantNoHint: string;
   procedure Add(const s: string);

+ 5 - 0
tests/webtbs/tw5001.pp

@@ -4,6 +4,11 @@
 program Project1;
 
 {$mode objfpc}{$H+}
+uses
+{$ifdef unix}
+  cwstring,
+{$endif unix}
+  SysUtils;
 
 resourcestring
   s = 'test';

+ 1 - 1
tests/webtbs/tw7758.pp

@@ -11,7 +11,7 @@ const
   c2=widechar('é');
   c3=widestring('é');
 var
-  c: char;
+  c: ansichar;
   wc,wc2: widechar;
   s,s2,a: ansistring;
   w: widestring;