tstring2.pp 549 B

123456789101112131415161718192021222324252627282930
  1. uses
  2. erroru;
  3. procedure chararray2stringtest;
  4. var
  5. a : array[1..10,1..10,1..5] of char;
  6. i,j,k,l : integer;
  7. begin
  8. for i:=1 to 10 do
  9. a[i,i]:='Hello';
  10. i:=1;
  11. j:=2;
  12. k:=3;
  13. l:=4;
  14. { test register allocation }
  15. if (a[i,i]<>'Hello') or
  16. (a[j,j]<>'Hello') or
  17. (a[k,k]<>'Hello') or
  18. (a[l,l]<>'Hello') then
  19. do_error(1000);
  20. end;
  21. begin
  22. writeln('Misc. shortstring tests');
  23. chararray2stringtest;
  24. writeln('Misc. shortstring tests successfully passed');
  25. halt(0);
  26. end.