Test suite results for test file test/units/strings/tstrcopy.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 "test/units/strings/tstrcopy.pp" information:

t_id 1221
t_adddate 2004/01/02
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/16 22:37:00 30 2024/05/17 01:13:00 28
i386 22 44.0 2024/05/16 22:58:00 34 2024/05/17 01:13:00 28
sparc 18 36.0 2024/05/16 23:24:00 38 2024/05/16 23:55:00 41
x86_64 6 12.0 2024/05/16 22:37:00 30 2024/05/16 22:53:00 29
powerpc64 2 4.0 2024/05/17 01:09:00 101 2024/05/17 01:11:00 108
aarch64 2 4.0 2024/05/17 00:12:00 32 2024/05/17 00:57:00 36
linux 11 22.0 2024/05/16 23:34:00 28 2024/05/17 01:13:00 28
win32 3 6.0 2024/05/16 22:58:00 34 2024/05/16 23:57:00 23
solaris 36 72.0 2024/05/16 22:37:00 30 2024/05/16 23:55:00 41
3.3.1 31 62.0 2024/05/16 22:58:00 34 2024/05/17 01:13:00 28
3.2.3 19 38.0 2024/05/16 22:37:00 30 2024/05/17 00:57:00 35

Source:

uses strings;

procedure test_strcopy;
var
  p: pchar;
  s: array[0..256] of char;
  buf: array[0..512] of char;
  i, j, k, l: longint;
begin
  for i := 0 to 256 do
    begin
      fillchar(s,sizeof(s),'b');
      s[i] := #0;
      for j := 0 to 3 do
        begin
          fillchar(buf,sizeof(buf),'a');
          p := strcopy(@buf[j+32],@s[0]);
          if (p <> @buf[j+32]) then
            begin
              writeln('error 0');
              halt(1);
            end;
          for l := 0 to j+31 do
            if buf[l] <> 'a' then
              begin
                writeln('error 1');
                halt(1);
              end;
          for l := j+32 to j+32+i-1 do
            if buf[l] <> 'b' then
              begin
                writeln('error 2');
                halt(1);
              end;
          if buf[j+i+32] <> #0 then
            begin
              writeln('error 3');
              halt(1);
            end;
          for l := j+i+32+1 to 512 do
            if buf[l] <> 'a' then
              begin
                writeln('error 4');
                halt(1);
              end;
        end;
    end;
end;

begin
  test_strcopy;
end.

Link to SVN view of test/units/strings/tstrcopy.pp source.