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/11/03 06:31:25 UTC

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

jasons      01/11/02 21:31:25

  Modified:    perl/t   IDOM_DOMException.t
  Log:
  	* t/IDOM_DOMException.t (Repository):
  	createDocument() now works
  
  Revision  Changes    Path
  1.6       +14 -14    xml-xerces/perl/t/IDOM_DOMException.t
  
  Index: IDOM_DOMException.t
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/t/IDOM_DOMException.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IDOM_DOMException.t	2001/10/10 20:03:55	1.5
  +++ IDOM_DOMException.t	2001/11/03 05:31:25	1.6
  @@ -7,7 +7,7 @@
   # Change 1..1 below to 1..last_test_to_print .
   # (It may become useful if the test is moved to ./t subdirectory.)
   
  -BEGIN { $| = 1; print "1..6\n"; }
  +BEGIN { $| = 1; print "1..7\n"; }
   END {print "not ok 1\n" unless $loaded;}
   use Carp;
   
  @@ -31,18 +31,18 @@
   # of the test code):
   
   
  -# my $impl = XML::Xerces::IDOM_DOMImplementation::getImplementation();
  -# my $dt = $impl->createDocumentType('Foo', 'foo', 'Foo.dtd');
  -# my $doc = $impl->createDocument('Foo', 'foo',$dt);
  -# eval {
  -#   $impl->createDocument('Bar', 'bar',$dt);
  -# };
  -# my $error = $@;
  -# result($error && 
  -#        is_object($error) &&
  -#        $error->isa('XML::Xerces::IDOM_DOMException') &&
  -#        $error->{code} == $XML::Xerces::IDOM_DOMException::WRONG_DOCUMENT_ERR
  -#       );
  +my $impl = XML::Xerces::IDOM_DOMImplementation::getImplementation();
  +my $dt = $impl->createDocumentType('Foo', 'foo', 'Foo.dtd');
  +my $doc = $impl->createDocument('Foo', 'foo',$dt);
  +eval {
  +  $impl->createDocument('Bar', 'bar',$dt);
  +};
  +my $error = $@;
  +result($error && 
  +       is_object($error) &&
  +       $error->isa('XML::Xerces::IDOM_DOMException') &&
  +       $error->{code} == $XML::Xerces::IDOM_DOMException::WRONG_DOCUMENT_ERR
  +      );
   
   # Create a couple of identical test documents
   my $document = q[<?xml version="1.0" encoding="utf-8"?>
  @@ -84,7 +84,7 @@
   eval {
     $doc1->appendChild($root2);
   };
  -my $error = $@;
  +$error = $@;
   result($error && 
          is_object($error) &&
          $error->isa('XML::Xerces::IDOM_DOMException') &&
  
  
  

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