Browse Source

+ $opt info
+ built-in test for equality of expected and actual result

Jonas Maebe 25 years ago
parent
commit
37339f70a6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      tests/testopt/testcse1.pp

+ 7 - 1
tests/testopt/testcse1.pp

@@ -1,3 +1,5 @@
+{ $OPT=-OG2p3}
+
 procedure t;
 procedure t;
 var
 var
   a: array[1..10,1..10] of string[31];
   a: array[1..10,1..10] of string[31];
@@ -13,7 +15,11 @@ begin
   asm
   asm
   end;
   end;
   a[i,j] := a[i,j] + c;
   a[i,j] := a[i,j] + c;
-  writeln(a[i,j]);
+  if a[i,j] <> '1234567890' then
+    begin
+      writeln('error!');
+      halt(1)
+    end;
 end;
 end;
 
 
 begin
 begin