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

t_id 238
t_adddate 2003/10/03
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/21 05:08:00 158 2024/05/21 07:39:00 37
i386 4 8.0 2024/05/21 06:26:00 59 2024/05/21 07:25:00 42
m68k 3 6.0 2024/05/21 06:59:00 58 2024/05/21 07:39:00 0
sparc 2 4.0 2024/05/21 06:46:00 68 2024/05/21 06:55:00 81
powerpc 10 20.0 2024/05/21 06:28:00 52 2024/05/21 07:24:00 181
arm 3 6.0 2024/05/21 06:43:00 210 2024/05/21 07:18:00 40
x86_64 2 4.0 2024/05/21 06:12:00 30 2024/05/21 06:21:00 29
powerpc64 6 12.0 2024/05/21 05:53:00 132 2024/05/21 07:32:00 77
mips 2 4.0 2024/05/21 07:08:00 154 2024/05/21 07:11:00 243
mipsel 4 8.0 2024/05/21 06:07:00 151 2024/05/21 07:17:00 228
aarch64 9 18.0 2024/05/21 06:24:00 23 2024/05/21 07:39:00 37
sparc64 3 6.0 2024/05/21 05:08:00 158 2024/05/21 07:17:00 165
loongarch64 2 4.0 2024/05/21 07:01:00 34 2024/05/21 07:33:00 0
linux 42 84.0 2024/05/21 05:08:00 158 2024/05/21 07:39:00 37
go32v2 1 2.0 2024/05/21 06:26:00 59 2024/05/21 06:26:00 59
solaris 2 4.0 2024/05/21 06:12:00 30 2024/05/21 06:21:00 29
darwin 5 10.0 2024/05/21 06:24:00 23 2024/05/21 07:04:00 38
3.3.1 28 56.0 2024/05/21 05:08:00 158 2024/05/21 07:39:00 0
3.2.3 22 44.0 2024/05/21 06:07:00 151 2024/05/21 07:39:00 37

Source:

Program trdtxt01;

{$ifdef fpc}
uses
  strings;
{$else}
uses
  SysUtils;
{$endif}

procedure test(b: boolean);
begin
  if b then exit;
  WriteLn('Error : Invalid data read!');
  halt(1);
end;

var
 T: Text;
 value_char: char;
 value_byte: byte;
 value_shortint : shortint;
 value_smallint : smallint;
 value_word : word;
 value_longint : longint;
 value_longword : cardinal;
 value_real : real;
 value_shortstr : shortstring;
 value_pchar : array[0..255] of char;
Begin
 Assign(T,'testpc.txt');
 Reset(T);
 { Read all the data in the correct order }
 { Read some characters }
 value_char := #0;
 ReadLn(T,value_char);
 test(value_char = 'a');
 value_char := #0;
 ReadLn(T,value_char);
 test(value_char = 'c');
 value_char := #0;
 ReadLn(T,value_char);
 test(value_char = 'z');
 value_char := #0;
 ReadLn(T,value_char);
 test(value_char = '#');
 { ***** Read some integer values ***** }
 {**** HEX ****}
 value_byte := 0;
 ReadLn(T,value_byte);
 test(value_byte = 127);
 value_byte := 0;
 ReadLn(T,value_byte);
 test(value_byte = 255);
 value_byte := 0;
 ReadLn(T,value_byte);
 test(value_byte = 51);
 value_shortint := 0;
 ReadLn(T,value_shortint);
 test(value_shortint = -127);
 {*** Integral *** }
 value_byte := 0;
 ReadLn(T,value_byte);
 test(value_byte = 127);
 value_byte := 0;
 ReadLn(T,value_byte);
 test(value_byte = 255);
 value_byte := 0;
 ReadLn(T,value_byte);
 test(value_byte = 33);
 value_shortint := 0;
 ReadLn(T,value_shortint);
 test(value_shortint = -127);
 {**** HEX ****}
 value_word := 0;
 ReadLn(T,value_word);
 test(value_word = 32767);
 value_word := 0;
 ReadLn(T,value_word);
 test(value_word = 65535);
 value_word := 0;
 ReadLn(T,value_word);
 test(value_word = 4660);
 value_smallint := 0;
 ReadLn(T,value_smallint);
 test(value_smallint = -32767);
 {*** Integral *** }
 value_word := 0;
 ReadLn(T,value_word);
 test(value_word = 12700);
 value_word := 0;
 ReadLn(T,value_word);
 test(value_word = 2550);
 value_word := 0;
 ReadLn(T,value_word);
 test(value_word = +33200);
 value_smallint := 0;
 ReadLn(T,value_smallint);
 test(value_smallint = -12700);
 {**** HEX ****}
 value_longword := 0;
 ReadLn(T,value_longword);
 test(value_longword = +$7FFFFFFF);
 value_longword := 0;
 ReadLn(T,value_longword);
 test(value_longword = $FFFFFFFF);
 value_longword := 0;
 ReadLn(T,value_longword);
 test(value_longword = $12341234);
 value_longint := 0;
 ReadLn(T,value_longint);
 test(value_longint = -$7FFFFFFF);
 {*** Integral *** }
 value_longword := 0;
 ReadLn(T,value_longword);
 test(value_longword = 12700);
 value_longword := 0;
 ReadLn(T,value_longword);
 test(value_longword = 2550);
 value_longword := 0;
 ReadLn(T,value_longword);
 test(value_longword = +2147483647);
 value_longint := 0;
 ReadLn(T,value_longint);
{ test(value_longint = -2147483648);}

 { Read some real type values }
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(01234));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(1278.1278));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121223.1278E00));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121224.1278e2));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121225.1278E02));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121216.1278E+00));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121227.1278e+2));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121228.1278E+02));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121233.1278E-00));
 value_real := 0.0;
 ReadLn(T,value_real);
 test(trunc(value_real) = trunc(121234.1278e-2));

 { Read some strings }
 value_shortstr := '';
 ReadLn(T,value_shortstr);
 test(length(value_shortstr) = 255);
 value_shortstr := '';
 ReadLn(T,value_shortstr);
 test(value_shortstr = 'Hello world!');
 value_shortstr := '';
 ReadLn(T,value_shortstr);
 test(length(value_shortstr) = 42);
 { Read a null terminated value }
 value_shortstr := '';
 ReadLn(T,value_pchar);
 test(strlen(value_pchar) = 33);

 { Read a value_charhar and make sure the value is value_chartrl-Z (#26) }
 ReadLn(T,value_char);
 test(value_char = #26);
 Close(T);
 WriteLn('All tests Ok!');
end.

Link to SVN view of test/units/system/trdtxt01.pp source.