Mercurial > pub > Impl
diff _test/Test/DOM/Node.pm @ 37:c2e7f7c96bcd
performance improvements, DOM reworked (a little)
author | Sergey |
---|---|
date | Mon, 23 Nov 2009 00:59:06 +0300 |
parents | 7f00786f8210 |
children | 16ada169ca75 |
line wrap: on
line diff
--- a/_test/Test/DOM/Node.pm Fri Nov 20 16:48:08 2009 +0300 +++ b/_test/Test/DOM/Node.pm Mon Nov 23 00:59:06 2009 +0300 @@ -17,7 +17,7 @@ test Create => sub { my ($this) = @_; - $this->Root(new IMPL::DOM::Node(nodeName => 'Root')) or failed "Failed to create a node"; + $this->Root(new IMPL::DOM::Document(nodeName => 'Root')) or failed "Failed to create a document"; }; test InsertNode => sub { @@ -36,13 +36,13 @@ failed "removeLast returned incorrect results" unless $lastChild == $child; }; -test GetRootNode => sub { +test GetDocumentNode => sub { my ($this) = @_; my $child = $this->Root->firstChild->appendNode(new IMPL::DOM::Node(nodeName => 'GrandChild')) or failed "Failed to append a child node"; - failed "rootNode is undef" unless $child->rootNode; - failed "rootNode returned incorrect value" unless $child->rootNode == $this->Root; + failed "document property is undef" unless $child->document; + failed "document property returned incorrect value" unless $child->document == $this->Root; }; test MoveNode => sub { @@ -52,7 +52,7 @@ $this->Root->appendNode($grandChild); failed "incorrect new parentNode value" unless ($grandChild->parentNode || 0) == $this->Root; - failed "incorrect new rootNode value" unless ($grandChild->rootNode || 0) == $this->Root; + failed "incorrect new document value" unless ($grandChild->document || 0) == $this->Root; }; test AppendRange => sub {