Test suite results for test file test/texception4.pp

Test run data :

Run ID:
Operating system: linux
Processor: sparc
Version: 3.3.1
Fails/OK/Total: 76/9144/9220
Version: 3.3.1
Full version: 3.3.1-15617-g1de3aba4e3
Comment: -XR/home/muller/sys-root/sparc-linux -Xd -Xr/home/muller/sys-root/sparc-linux
Machine: cfarm14
Category: 1
SVN revisions: 1de3aba4e3:0655b342d4:20c95f0455:61397d40ae
Submitter: muller
Date: 2024/04/27 12:28:00 <> 2024/04/26
Previous run: 939737
Next run: 941203

Hide skipped tests

Hide successful tests

Test file "test/texception4.pp" information:

t_id 36
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
477533045940432FalseFalseFailed to run

Record count: 1

Log of 940432:

Unhandled trap: 0x28
pc: 000000000001023c  npc: 0000000000010240
%g0-3: 0000000000000000 00000000000fe9c0 0000000000000000 0000000000000000
%g4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
%o0-3: 0000000000000064 0000000000000000 0000000000000000 0000000000000000 
%o4-7: 0000000000000000 0000000000000000 0000000040800f50 00000000000101f8 
%l0-3: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
%l4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
%i0-3: 0000000040801054 00000000000ff384 000000004080105c 0000000000000000 
%i4-7: 0000000000000000 0000000000000000 0000000040800ff8 00000000000100ec 
pstate: 00000092 ccr: 44 (icc: -Z-- xcc: -Z--) asi: 82 tl: 0 pil: 0 gl: 0
tbr: 0000000000000000 hpstate: 0000000000000000 htba: 0000000000000000
cansave: 6 canrestore: 0 otherwin: 0 wstate: 0 cleanwin: 7 cwp: 0
fsr: 0000000009000000 y: 0000000000000000 fprs: 0000000000000000

Source:

{$mode objfpc}

uses
  sysutils;

const
  Program_has_errors : boolean = false;
  exception_called   : boolean = false;
  TestNumber : longint = 10000;

procedure test_exception(const s : string);
  begin
    if not(exception_called) then
      begin
        Writeln('Exception not called : ',s);
        Program_has_errors := true;
      end;
  end;

var
   i,j : longint;
   e : extended;
   exception_count,level : longint;
begin
   j:=0;
   i:=100;
   try
   exception_called:=false;
   j := i div j;
   except
     on e : exception do
       begin
         Writeln('First integer exception called ',e.message);
         exception_called:=true;
       end;
   end;
   test_exception('First division by zero for integers');
   try
   exception_called:=false;
   j := i div j;
   except
     on e : exception do
       begin
         Writeln('Second integer exception called ',e.message);
         exception_called:=true;
       end;
   end;
   test_exception('Second division by zero for integers');
   try
   exception_called:=false;
   e:=i/j;
   except
     on e : exception do
       begin
         Writeln('First real exception called ',e.message);
         exception_called:=true;
       end;
   end;
   test_exception('First division by zero for reals');
   try
   exception_called:=false;
   e:=i/j;
   except
     on e : exception do
       begin
         Writeln('Second real exception called ',e.message);
         exception_called:=true;
       end;
   end;
   test_exception('Second division by zero for reals');
   try
   exception_called:=false;
   j := i div j;
   except
     on e : exception do
       begin
         Writeln('exception called ',e.message);
         exception_called:=true;
       end;
   end;
   test_exception('third division by zero for integers');
   exception_count:=0;
   level:=0;
   for j:=1 to TestNumber do
     begin
       try
         i:=0;
         inc(level);
         e:=j/i;
       except
         on e : exception do
           begin
             inc(exception_count);
             if level>1 then
               Writeln('exception overrun');
             dec(level);
           end;
       end;

     end;
   if exception_count<>TestNumber then
     begin
       program_has_errors:=true;
       Writeln('Could not generate ',TestNumber,' consecutive exceptions');
       Writeln('Only ',exception_count,' exceptions were generated');
     end
   else
     begin
       Writeln(TestNumber,' consecutive exceptions generated successfully');
     end;
   try
   exception_called:=false;
   i := -1;
   e := ln(i);
   except
     on e : exception do
       begin
         Writeln('exception called ',e.message);
         exception_called:=true;
       end;
   end;
   test_exception('ln(-1)');
   if program_has_errors then
     Halt(1);
end.

Link to SVN view of test/texception4.pp source.