t_id
236
t_adddate
2003/10/03
t_result
0
t_knownrunerror
0
tr_id | run | tr_ok | tr_skip | tr_result |
---|---|---|---|---|
451913333 | 936295 | True | False | Successfully run |
Record count: 1
{ this tests the pi routine, as an inline } program tpi; const PI_CONST = 3.1459; { the following expression also works on constants } PI_CONST_VALUE = pi; procedure fail; begin WriteLn('Failed!'); halt(1); end; var value : real; _result : boolean; Begin Write('Pi() test...'); _result := true; value:=pi; if trunc(value) <> trunc(PI_CONST) then _result := false; If trunc(Pi) <> trunc(PI_CONST) then _result := false; If trunc(Pi) <> trunc(PI_CONST_VALUE) then _result := false; if not _result then fail; WriteLn('Success!'); end. { $Log: tpi.pp,v $ Revision 1.1 2002/09/16 19:15:54 carl * several new routines have a testsuit. }