Browse Source

* corrected sources so that they execute

pierre 27 years ago
parent
commit
4b59eb6621
4 changed files with 35 additions and 5 deletions
  1. 15 4
      tests/tbs0017.pp
  2. 2 0
      tests/ts010007.pp
  3. 16 0
      tests/ts010014.pp
  4. 2 1
      tests/ts010100.pp

+ 15 - 4
tests/tbs0017.pp

@@ -1,27 +1,38 @@
+
+{$ifdef go32v2}
+   uses dpmiexcp;
+
+{$endif go32v2}
+
+const
+      nextoptpass : longint = 0;
   procedure init;
   procedure init;
 
 
-    var
-       endofparas : boolean;
+    const
+       endofparas : boolean = false;
 
 
     procedure getparastring;
     procedure getparastring;
 
 
       procedure nextopt;
       procedure nextopt;
 
 
         begin
         begin
+           endofparas:=true;
            getparastring;
            getparastring;
+           inc(nextoptpass);
            init;
            init;
-           endofparas:=false;
         end;
         end;
 
 
       begin
       begin
+       if not endofparas then
          nextopt;
          nextopt;
       end;
       end;
       
       
     begin
     begin
-       getparastring;
+         getparastring;
     end;      
     end;      
      
      
 begin
 begin
    init;
    init;
+   if nextoptpass<>1 then Halt(1);
 end.
 end.
 
 

+ 2 - 0
tests/ts010007.pp

@@ -1,3 +1,5 @@
+{ $OPT=-S2 }
+{ classes need objpas !! }
 { needed to intercept  GPF (PM) }
 { needed to intercept  GPF (PM) }
 {$ifdef go32v2}
 {$ifdef go32v2}
   uses dpmiexcp;
   uses dpmiexcp;

+ 16 - 0
tests/ts010014.pp

@@ -29,8 +29,24 @@ type
 var
 var
    p : pa;
    p : pa;
    data : array[0..4] of longint;
    data : array[0..4] of longint;
+   saveexit : pointer;
+
+  procedure testerror;
+    begin
+       exitproc:=saveexit;
+       if errorcode=210 then
+         begin
+            errorcode:=0;
+            writeln('Object valid VMT check works');
+            runerror(0);
+         end 
+       else
+         halt(1);
+    end;
 
 
 begin
 begin
+   saveexit:=exitproc;
+   exitproc:=@testerror;
    fillchar(data,sizeof(data),12);
    fillchar(data,sizeof(data),12);
    p:=new(pa,init);
    p:=new(pa,init);
    p^.p;
    p^.p;

+ 2 - 1
tests/ts010100.pp

@@ -4,5 +4,6 @@ var
    o : tobject;
    o : tobject;
 
 
 begin
 begin
-   halt(1);
+   if assigned(o) then
+     halt(1);
 end.
 end.