equal
deleted
inserted
replaced
31 |
31 |
32 #include "config.h" |
32 #include "config.h" |
33 #include "testutils.h" |
33 #include "testutils.h" |
34 #include "setupsentry.h" |
34 #include "setupsentry.h" |
35 |
35 |
|
36 #include "std_log_result.h" |
36 |
37 |
37 #define VATTUNIEMENRANTA_2_GPS L"60.154023,24.887724" |
38 #define VATTUNIEMENRANTA_2_GPS L"60.154023,24.887724" |
38 |
39 |
39 |
40 |
40 |
41 |
280 // test methods |
281 // test methods |
281 // |
282 // |
282 |
283 |
283 void testHarvestJpg(Itk::TestMgr * testMgr) |
284 void testHarvestJpg(Itk::TestMgr * testMgr) |
284 { |
285 { |
|
286 char *xml_file = (char *)__FUNCTION__; |
|
287 assert_failed = 0; |
285 testMgr_ = testMgr; |
288 testMgr_ = testMgr; |
286 Cpt::traverse(JPG_TEST_CORPUS_PATH, |
289 Cpt::traverse(JPG_TEST_CORPUS_PATH, |
287 this); |
290 this); |
288 util_->flush(); |
291 util_->flush(); |
|
292 testResultXml(xml_file); |
289 } |
293 } |
290 |
294 |
291 |
295 |
292 void testSearchJpg(Itk::TestMgr * testMgr) |
296 void testSearchJpg(Itk::TestMgr * testMgr) |
293 { |
297 { |
|
298 char *xml_file = (char *)__FUNCTION__; |
|
299 assert_failed = 0; |
294 testMgr_ = testMgr; |
300 testMgr_ = testMgr; |
295 |
301 |
296 cpix_Hits |
302 cpix_Hits |
297 * hits = search(GPSLOC_DATA, |
303 * hits = search(GPSLOC_DATA, |
298 sizeof(GPSLOC_DATA) / sizeof(GpsLocation), |
304 sizeof(GPSLOC_DATA) / sizeof(GpsLocation), |
299 NULL, |
305 NULL, |
300 4.0, |
306 4.0, |
301 10); |
307 10); |
302 |
308 |
303 cpix_Hits_destroy(hits); |
309 cpix_Hits_destroy(hits); |
|
310 testResultXml(xml_file); |
304 } |
311 } |
305 |
312 |
306 private: |
313 private: |
307 void cleanup() |
314 void cleanup() |
308 { |
315 { |
428 qryStr); |
435 qryStr); |
429 ITK_ASSERT(testMgr_, |
436 ITK_ASSERT(testMgr_, |
430 cpix_Succeeded(queryParser_), |
437 cpix_Succeeded(queryParser_), |
431 "Failed to parse: %S\n", |
438 "Failed to parse: %S\n", |
432 qryStr); |
439 qryStr); |
|
440 if(!cpix_Succeeded(queryParser_)) |
|
441 { |
|
442 assert_failed = 1; |
|
443 } |
433 |
444 |
434 cpix_Hits |
445 cpix_Hits |
435 * hits = cpix_IdxDb_search(util_->idxDb(), |
446 * hits = cpix_IdxDb_search(util_->idxDb(), |
436 query_); |
447 query_); |
437 ITK_ASSERT(testMgr_, |
448 ITK_ASSERT(testMgr_, |
438 cpix_Succeeded(util_->idxDb()), |
449 cpix_Succeeded(util_->idxDb()), |
439 "Failed to search (geo)"); |
450 "Failed to search (geo)"); |
|
451 if(!cpix_Succeeded(util_->idxDb())) |
|
452 { |
|
453 assert_failed = 1; |
|
454 } |
440 |
455 |
441 int32_t |
456 int32_t |
442 hitCount = cpix_Hits_length(hits); |
457 hitCount = cpix_Hits_length(hits); |
443 |
458 |
444 if (hitCount > 0) |
459 if (hitCount > 0) |