searchengine/cpix/tsrc/cpixunittest/inc/testutils.h
changeset 15 cf5c74390b98
parent 2 6c1a2771f4b7
equal deleted inserted replaced
10:afe194b6b1cd 15:cf5c74390b98
   208 #define DRIVE "e:"
   208 #define DRIVE "e:"
   209 #endif
   209 #endif
   210 
   210 
   211 extern const Volume Volumes[];
   211 extern const Volume Volumes[];
   212 
   212 
       
   213 #define ALLOC_DOC(DOC, COUNT)   DOC = (cpix_Document**)malloc (sizeof(cpix_Document*)* COUNT); \
       
   214         for  (int i = 0; i < COUNT; i++) { \
       
   215             (DOC[i]) = (cpix_Document*)malloc (sizeof(cpix_Document)); \
       
   216             DOC[i]->ptr_ = NULL; \
       
   217         }
       
   218 #define FREE_DOC(DOC, COUNT)  for (int i=0; i< COUNT; i++) free(DOC[i]); free (DOC);
   213 
   219 
   214 #endif // CPIXUNITTEST_TESTUTILS_H_
   220 #endif // CPIXUNITTEST_TESTUTILS_H_