diff -r 6c1a2771f4b7 -r ae3f1779f6da searchengine/cpix/tsrc/cpixunittest/src/en_stemtests.cpp --- a/searchengine/cpix/tsrc/cpixunittest/src/en_stemtests.cpp Fri May 14 16:57:37 2010 +0300 +++ b/searchengine/cpix/tsrc/cpixunittest/src/en_stemtests.cpp Thu May 27 13:59:44 2010 +0300 @@ -32,6 +32,8 @@ #include "testcorpus.h" #include "setupsentry.h" +#include "std_log_result.h" + class StemContext : public Itk::ITestContext, public Cpt::IFileVisitor { @@ -190,6 +192,7 @@ { printf("Failed to delete\n"); cpix_ClearError(util_->idxDb()); + assert_failed = 1; break; } else @@ -208,6 +211,10 @@ "Only %d docs instead of %d have been deleted", result, expectedDelCount); + if(result != expectedDelCount) + { + assert_failed = 1; + } for (size_t i = 0; i < count; ++i) { @@ -270,10 +277,13 @@ void testAddFiles(Itk::TestMgr * testMgr) { + char *xml_file = (char *)__FUNCTION__; + assert_failed = 0; testMgr_ = testMgr; Cpt::traverse(FILE_TEST_CORPUS_PATH "\\en", this); util_->flush(); + testResultXml(xml_file); } @@ -281,7 +291,8 @@ void testSearchFiles(Itk::TestMgr * testMgr) { using namespace Itk; - + char *xml_file = (char *)__FUNCTION__; + assert_failed = 0; cpix_Hits * hits = cpix_IdxDb_search(util_->idxDb(), query_); @@ -292,6 +303,7 @@ false, "Failed to search index"); cpix_ClearError(util_->idxDb()); + assert_failed = 1; } else { @@ -300,17 +312,21 @@ cpix_Hits_destroy(hits); } + testResultXml(xml_file); } void testDeleteFiles(Itk::TestMgr * testMgr) { + char *xml_file = (char *)__FUNCTION__; + assert_failed = 0; deleteFiles(testMgr, EnglishDocsToDelete, sizeof(EnglishDocsToDelete)/sizeof(wchar_t*), 2); util_->flush(); + testResultXml(xml_file); }