You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/03/16 17:33:36 UTC

cvs commit: xml-xerces/perl/t actualCast.t

jasons      01/03/16 08:33:35

  Modified:    perl/t   actualCast.t
  Log:
  	* t/actualCast.t (Repository):
  	actual_cast() is now automatically called, so it is impossible to
  	   get a DOM_Node superclass object.
  
  Revision  Changes    Path
  1.4       +6 -6      xml-xerces/perl/t/actualCast.t
  
  Index: actualCast.t
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/t/actualCast.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- actualCast.t	2001/03/15 05:55:56	1.3
  +++ actualCast.t	2001/03/16 16:33:33	1.4
  @@ -13,7 +13,7 @@
   use XML::Xerces;
   
   use lib 't';
  -use TestUtils qw(result $DOM $PERSONAL);
  +use TestUtils qw(result $DOM $PERSONAL $PERSONAL_FILE_NAME);
   
   # turn off annoying warnings
   $SIG{__WARN__} = 'IGNORE';
  @@ -28,11 +28,11 @@
   # (correspondingly "not ok 13") depending on the success of chunk 13
   # of the test code):
   
  -$DOM->parse( new XML::Xerces::LocalFileInputSource('personal.xml') );
  +$DOM->parse( new XML::Xerces::LocalFileInputSource($PERSONAL_FILE_NAME) );
   
  -# first test we get the DOM_Node back
  +# test that we get a subclass of DOM_Node back
   my $name = $DOM->getDocument->getElementsByTagName('link')->item(0);
  -result(ref($name) eq 'XML::Xerces::DOM_Node', $i), $i++;
  +result(ref($name) && $name->isa('XML::Xerces::DOM_Node'), $i), $i++;
   
  -# now test we can cast it to the proper node type
  -result(ref($name->actual_cast()) ne 'XML::Xerces::DOM_Node', $i), $i++;
  +# test that it really is a subclass
  +result(ref($name) ne 'XML::Xerces::DOM_Node', $i), $i++;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org