Commits

Anonymous committed 02d222b

Modified Files:
Tag: mm_fix
LibXML.pm
t/03doc.t t/04node.t t/05text.t t/06elements.t
t/07dtd.t t/09xpath.t t/10ns.t t/20extras.t
[fix] everything runs now with all recent perls (5.00503 - 5.7.3)

  • Participants
  • Parent commits 0d6d028
  • Branches mm_fix

Comments (0)

Files changed (8)

 # since all tests are run on a preparsed 
 
 use Test;
-use Devel::Peek;
-
 use strict;
-use warnings;
 
 BEGIN { plan tests => 62 };
 use XML::LibXML;
 
     my $doc = XML::LibXML::Document->createDocument();
     ok($doc);
-    ok( $doc->encoding,undef); 
+    ok( not defined $doc->encoding); 
     ok( $doc->version,  "1.0" );
-    ok( $doc->standalone, -1 ); # is the value we get for undefined,
-                                   # actually the same as 0 but just not set.
-    ok( $doc->URI, undef);       # should be set by default.
+    ok( $doc->standalone, -1 );  # is the value we get for undefined,
+                                 # actually the same as 0 but just not set.
+    ok( not defined $doc->URI);  # should be set by default.
     ok( $doc->compression, -1 ); # -1 indicates NO compression at all!
                                  # while 0 indicates just no zip compression 
                                  # (big difference huh?)
 # since all tests are run on a preparsed 
 
 use Test;
-use Devel::Peek;
-
-use strict;
-use warnings;
 
 BEGIN { plan tests => 101 };
 use XML::LibXML;
     ok($node);
     ok($node->nodeType, XML_ELEMENT_NODE);
     ok($node->nodeName, "foo");
-    ok($node->nodeValue, undef);
+    ok(not defined $node->nodeValue);
     ok($node->hasChildNodes);
     ok($node->textContent, "bar&foo bar");
 
 # this test checks the DOM Characterdata interface of XML::LibXML
 
 use Test;
-use Devel::Peek;
-
-use strict;
-use warnings;
 
 BEGIN { plan tests => 24 };
 use XML::LibXML;
 # this test checks the DOM element and attribute interface of XML::LibXML
 
 use Test;
-use Devel::Peek;
-
-use strict;
-use warnings;
-
 
 BEGIN { plan tests => 51 };
 use XML::LibXML;
     $elem->setAttributeNodeNS($nsAttr);
     ok( $elem->hasAttributeNS($nsURI, $foo) );    
 
-    ok( $nsAttr->ownerDocument, undef);
+    ok( not defined $nsAttr->ownerDocument);
     # warn $elem->toString() , "\n";
 } 
 
     @cn = $e->childNodes;
     ok( scalar( @cn ), 1 );
 
-    ok( $t2->parentNode, undef);
-    ok( $t3->parentNode, undef);
+    ok(not defined $t2->parentNode);
+    ok(not defined $t3->parentNode);
 }
 
 
 # $Id$
 
 use Test;
-use Devel::Peek;
-
-use strict;
-use warnings;
 
 BEGIN { plan tests => 20 };
 use XML::LibXML;
     ok( $dtd->isSameNode( $doc->internalSubset ) );
 
     $doc->setExternalSubset( $dtd );
-    ok( $doc->internalSubset, undef );
+    ok(not defined $doc->internalSubset );
     ok( $dtd->isSameNode( $doc->externalSubset ) );
 
     $doc->setInternalSubset( $dtd );
-    ok( $doc->externalSubset, undef );
+    ok(not defined  $doc->externalSubset );
     ok( $dtd->isSameNode( $doc->internalSubset ) );
 
     my $dtd2 = $doc->createDTD( "huhu",
                               );
 
     $doc->setInternalSubset( $dtd2 );
-    ok( $dtd->parentNode, undef );
+    ok(not defined $dtd->parentNode );
     ok( $dtd2->isSameNode( $doc->internalSubset ) );    
 
  
     my $dtd3 = $doc->removeInternalSubset;
     ok( $dtd3->isSameNode($dtd2) );
-    ok( $doc->internalSubset, undef );
+    ok(not defined $doc->internalSubset );
 
     $doc->setExternalSubset( $dtd2 );
 
     $dtd3 = $doc->removeExternalSubset;
     ok( $dtd3->isSameNode($dtd2) );
-    ok( $doc->externalSubset, undef );
+    ok(not defined $doc->externalSubset );
 }
 
 {
 use Test;
-use Devel::Peek;
-
 use strict;
-use warnings;
 
 BEGIN { plan tests => 20 };
 use XML::LibXML;
     ok( $result->string_value, "true" );
 
     $result = $doc->find( "contains(/foo/bar[3], 'test 1')" );
-    ok( !$result );
+    ok( $result == 0 );
 }
 
 
     ok( $x2[1]->namespaceURI , "http://foobar" );    
 
     # namespace scopeing
-    ok( $elem->lookupNamespacePrefix( "http://kungfoo" ), undef );
-    ok( $elem->lookupNamespacePrefix( "http://foobar" ), undef );
+    ok( not defined $elem->lookupNamespacePrefix( "http://kungfoo" ) );
+    ok( not defined $elem->lookupNamespacePrefix( "http://foobar" ) );
 }
 
 print "# 4. post creation namespace setting\n";
 # $Id$
 
 use Test;
-use Devel::Peek;
-
-use strict;
-use warnings;
 
 BEGIN { plan tests => 5 };
 use XML::LibXML;