--- trunk/t/5_Node.t 2006/08/06 18:15:11 173 +++ trunk/t/5_Node.t 2006/11/05 16:01:36 187 @@ -3,7 +3,7 @@ use strict; use blib; -my $tests = 280; +my $tests = 304; use Test::More; use Test::Exception; @@ -147,6 +147,7 @@ for ( 1 .. 17 ) { $doc->add_attr('@uri', 'test' . $_); + $doc->set_score( $_ * 10000 ); ok( $node->put_doc($doc), "put_doc test$_"); #diag $doc->dump_draft; cmp_ok( $node->doc_num, '==', ($_ + 1), "node->doc_num " . ($_ + 1)); @@ -223,8 +224,12 @@ } ok( my $id = $node->uri_to_id( $uri ), "uri_to_id($uri)"); - ok( $node->get_doc( $id ), "get_doc($id)"); - ok( $node->get_doc_by_uri( $uri ), "get_doc_by_uri($uri)"); + my $doc; + my $score = $num * 10000; + ok( $doc = $node->get_doc( $id ), "get_doc($id)"); + cmp_ok( $doc->score, '==', $score, "score $score"); + ok( $doc = $node->get_doc_by_uri( $uri ), "get_doc_by_uri($uri)"); + cmp_ok( $doc->score, '==', $score, "score $score"); cmp_ok( $node->get_doc_attr( $id, '@uri' ), 'eq', $uri, "get_doc_attr $id"); cmp_ok( $node->get_doc_attr_by_uri( $uri, '@uri' ), 'eq', $uri, "get_doc_attr $id"); ok( my $k1 = $node->etch_doc( $id ), "etch_doc_by_uri $uri");