searchengine/cpix/tsrc/cpixunittest/src/whiteboxtests.cpp
changeset 15 cf5c74390b98
parent 3 ae3f1779f6da
child 24 65456528cac2
equal deleted inserted replaced
10:afe194b6b1cd 15:cf5c74390b98
   512                to);
   512                to);
   513 
   513 
   514         for (int32_t hitDocIdx = from; hitDocIdx < to; ++hitDocIdx)
   514         for (int32_t hitDocIdx = from; hitDocIdx < to; ++hitDocIdx)
   515             {
   515             {
   516                 cpix_Document
   516                 cpix_Document
   517                     doc;
   517                     **doc;
       
   518                 ALLOC_DOC(doc, 1);
   518 
   519 
   519                 cpix_Hits_doc(hits,
   520                 cpix_Hits_doc(hits,
   520                               hitDocIdx,
   521                               hitDocIdx,
   521                               &doc);
   522                               doc,
   522 
   523                               1);
   523                 if (cpix_Failed(hits))
   524 
       
   525                 if (cpix_Failed(hits) || (doc_Fetch_Failed(doc[0])))
   524                     {
   526                     {
   525                         wchar_t
   527                         wchar_t
   526                             buf[92];
   528                             buf[92];
   527                         cpix_Error_report(hits->err_,
   529                         cpix_Error_report(hits->err_,
   528                                           buf,
   530                                           buf,
   532                                buf);
   534                                buf);
   533                         cpix_ClearError(hits);
   535                         cpix_ClearError(hits);
   534                         break;
   536                         break;
   535                     }
   537                     }
   536 
   538 
   537                 util_->printHit(&doc,
   539                 util_->printHit(doc[0],
   538                                 mgr);
   540                                 mgr);
       
   541                 FREE_DOC(doc, 1);
   539             }
   542             }
   540     }
   543     }
   541 
   544 
   542 
   545 
   543 };
   546 };