Browse Source

*** empty log message ***

florian 25 years ago
parent
commit
0efea99021
2 changed files with 40 additions and 6 deletions
  1. 10 6
      tests/test/readme.txt
  2. 30 0
      tests/test/teststr2.pp

+ 10 - 6
tests/test/readme.txt

@@ -1,9 +1,13 @@
 This directory contains tests for several parts of the compiler:
 The tests ordered how they should be executed
 
-Ansistrings .................. testansi.pp
-                               testa2.pp 
-Classes ...................... testdom.pp
-Exceptions ................... testexc.pp
-                               testexc2.pp
-                               testexc3.pp
+Shortstrings .......... teststr.pp     compatibility and speed of
+                                              string functions
+                        teststr2.pp    some misc. tests mainly collected
+                                       from bug reports
+Ansistrings ........... testansi.pp
+                        testa2.pp 
+Classes ............... testdom.pp
+Exceptions ............ testexc.pp
+                        testexc2.pp
+                        testexc3.pp

+ 30 - 0
tests/test/teststr2.pp

@@ -0,0 +1,30 @@
+uses
+   dotest;
+
+procedure chararray2stringtest;
+
+  var
+     a : array[1..2,1..10,1..5] of char;
+     i,j,k,l : integer;
+
+  begin
+     for i:=1 to 10 do
+       a[i,i]:='Hello';
+     i:=1;
+     j:=2;
+     k:=3;
+     l:=4;
+     { test register allocation }
+     if (a[i,i]<>'Hello') or
+       (a[i,i]<>'Hello') or
+       (a[i,i]<>'Hello') or
+       (a[i,i]<>'Hello') then
+       do_error(1000);
+   end;
+
+begin
+   writeln('Misc. shortstring tests');
+   chararray2stringtest;
+   writeln('Misc. shortstring tests successfully passed');
+   halt(0);
+end.