Browse Source

* added test for new IS operator

git-svn-id: trunk@15435 -
ivost 15 years ago
parent
commit
46a44702dc
1 changed files with 3 additions and 32 deletions
  1. 3 32
      tests/test/tdel2.pp

+ 3 - 32
tests/test/tdel2.pp

@@ -6,6 +6,7 @@ program tdel2;
  }
 
 uses
+  //heaptrc,
   SysUtils;
 
 const
@@ -130,35 +131,6 @@ var
   P: Pointer;
   O: TImpl;
 begin
-  (*C1 := TC1.Create;
-  C2 := TC2.Create;
-  C3 := TC3.Create;
-  writeln('Testing typecasting...');
-  
-  I := C1;
-  if I<>nil then
-    succ('field', I.GetRefCount)
-  else
-    fail('field');
-  
-  I := C2;
-  if I<>nil then
-    succ('function', I.GetRefCount)
-  else
-    fail('function');
-
-  I := C3;
-  if I<>nil then
-    succ('class field', I.GetRefCount)
-  else
-    fail('class field');
-
-  {clean up}
-  I := nil;
-  C1.Free;
-  C2.Free;
-  C3.Free;*)
-
 
 (*******************************************************************************
  * GetInterface function
@@ -233,8 +205,7 @@ begin
  * IS operator
  *******************************************************************************)
 
- {$warning THIS PART IS ENABLED AS SOON AS "IS" OPERATOR IS COMPLETELY IMPLEMENTED}
-  {writeln('Testing ''object is interface'' operator...');
+  writeln('Testing ''object is interface'' operator...');
   for T := 0 to High(tests) do
   begin
     C := tests[T].c.Create;
@@ -277,7 +248,7 @@ begin
       fail(tests[T].by);
     I := nil;
     C.Free;
-  end;}
+  end;
 
 
 (*******************************************************************************