Test suite results for test file webtbs/tw3595.pp

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all tests

Test file "webtbs/tw3595.pp" information:

t_id 1526
t_adddate 2005/03/15
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Successfully run 50 100.0 2024/05/20 16:27:00 32 2024/05/20 23:33:00 28
i386 19 38.0 2024/05/20 16:41:00 44 2024/05/20 23:33:00 28
m68k 1 2.0 2024/05/20 22:44:00 190 2024/05/20 22:44:00 190
sparc 6 12.0 2024/05/20 23:25:00 38 2024/05/20 23:32:00 40
powerpc 1 2.0 2024/05/20 23:05:00 185 2024/05/20 23:05:00 185
arm 1 2.0 2024/05/20 22:30:00 59 2024/05/20 22:30:00 59
x86_64 6 12.0 2024/05/20 16:52:00 25 2024/05/20 19:35:00 26
powerpc64 2 4.0 2024/05/20 23:13:00 213 2024/05/20 23:20:00 71
mips 1 2.0 2024/05/20 22:51:00 240 2024/05/20 22:51:00 240
mipsel 1 2.0 2024/05/20 22:58:00 148 2024/05/20 22:58:00 148
aarch64 12 24.0 2024/05/20 16:27:00 32 2024/05/20 22:24:00 44
linux 11 22.0 2024/05/20 22:24:00 44 2024/05/20 23:30:00 79
solaris 22 44.0 2024/05/20 16:41:00 44 2024/05/20 23:33:00 28
darwin 11 22.0 2024/05/20 16:27:00 32 2024/05/20 17:50:00 56
win64 6 12.0 2024/05/20 16:52:00 25 2024/05/20 19:35:00 26
3.3.1 14 28.0 2024/05/20 17:01:00 26 2024/05/20 23:33:00 28
3.2.2 9 18.0 2024/05/20 16:41:00 44 2024/05/20 17:30:00 45
3.2.3 27 54.0 2024/05/20 16:27:00 32 2024/05/20 23:30:00 38

Source:

{ Source provided for Free Pascal Bug Report 3595 }
{ Submitted by "Martin Schreiber" on  2005-01-24 }
{ e-mail:  }
program project1;

{$ifdef FPC} {$mode objfpc}{$H+} {$endif}

uses
  Classes,sysutils;

type
 ttest = class(tcomponent)
  private
   fwstr: widestring;
  published
   property wstr: widestring read fwstr write fwstr;
 end;

const
 textfilename = 'test.txt';

var
 test1,test2: ttest;
 memstream: tmemorystream;
 filestream: tfilestream;

function widestringtocharinfo(const str: widestring): string;
var
 int1: integer;
begin
 result:= '';
 for int1:= 1 to length(str) do begin
  result:= result + '#' + inttostr(ord(str[int1]));
 end;
end;

begin
 test1:= ttest.create(nil);
 test2:= ttest.create(nil);
 with test1 do begin
  setlength(fwstr,3);
  fwstr[1]:= widechar(255);
  fwstr[2]:= widechar(256);
  fwstr[3]:= widechar(257);
  fwstr:= fwstr + #0#1'abcde'#127#128#129;
 end;
 try
  filestream:= tfilestream.create(textfilename,fmopenread);
  memstream:= tmemorystream.create;
  try
   objecttexttobinary(filestream,memstream);
   writeln('objecttexttobinary OK');
   try
    memstream.position:= 0;
    memstream.readcomponent(test2);
    writeln('object reading OK');
    if test1.wstr = test2.wstr then begin
     writeln('data OK');
    end
    else begin
     writeln('data wrong. expected:');
     writeln(widestringtocharinfo(test1.wstr));
     writeln('actual:');
     writeln(widestringtocharinfo(test2.wstr));
    end;
   except
    on e: exception do begin
     writeln('object reading fails: '+ e.message);
    end;
   end;
  except
   on e: exception do begin
    writeln('objecttexttobinary fails: '+e.message);
   end;
  end;
  filestream.free;
  memstream.free;
 except
  writeln('file '+textfilename+' not found.');
 end;
 filestream:= tfilestream.create(textfilename,fmcreate);
 memstream:= tmemorystream.create;
 memstream.writecomponent(test1);
 memstream.position:= 0;
 objectbinarytotext(memstream,filestream);
 memstream.free;
 filestream.free;
 test1.free;
 test2.free;
end.

Link to SVN view of webtbs/tw3595.pp source.