xapian-core
1.4.26
|
Tests of geospatial functionality. More...
#include <config.h>
#include "api_geospatial.h"
#include <xapian.h>
#include "apitest.h"
#include "testsuite.h"
#include "testutils.h"
Go to the source code of this file.
Functions | |
static void | builddb_coords1 (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (latlongpostingsource1, backend &&!remote &&!inmemory) | |
Test behaviour of the LatLongDistancePostingSource. More... | |
DEFINE_TESTCASE (latlongcoords1, !backend) | |
DEFINE_TESTCASE (latlongmetric1, !backend) | |
DEFINE_TESTCASE (latlongmetric2, !backend) | |
DEFINE_TESTCASE (latlongkeymaker1, !backend) | |
Tests of geospatial functionality.
Definition in file api_geospatial.cc.
|
static |
Definition at line 39 of file api_geospatial.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), and Xapian::LatLongCoord::serialise().
Referenced by DEFINE_TESTCASE().
DEFINE_TESTCASE | ( | latlongpostingsource1 | , |
backend &&!remote &&! | inmemory | ||
) |
Test behaviour of the LatLongDistancePostingSource.
Definition at line 59 of file api_geospatial.cc.
References Xapian::LatLongCoords::append(), Xapian::ValuePostingSource::at_end(), builddb_coords1(), get_database(), Xapian::ValuePostingSource::get_docid(), Xapian::LatLongDistancePostingSource::get_weight(), Xapian::LatLongDistancePostingSource::init(), Xapian::LatLongDistancePostingSource::next(), TEST_EQUAL, and TEST_EQUAL_DOUBLE.
DEFINE_TESTCASE | ( | latlongcoords1 | , |
! | backend | ||
) |
Definition at line 269 of file api_geospatial.cc.
References Xapian::LatLongCoords::append(), Xapian::LatLongCoords::begin(), Xapian::LatLongCoords::empty(), Xapian::LatLongCoords::end(), Xapian::LatLongCoord::get_description(), Xapian::LatLongCoords::get_description(), Xapian::LatLongCoord::serialise(), Xapian::LatLongCoords::size(), TEST, TEST_EQUAL, TEST_NOT_EQUAL, and Xapian::LatLongCoord::unserialise().
DEFINE_TESTCASE | ( | latlongmetric1 | , |
! | backend | ||
) |
Definition at line 339 of file api_geospatial.cc.
References Xapian::Registry::get_lat_long_metric(), Xapian::GreatCircleMetric::name(), Xapian::GreatCircleMetric::serialise(), TEST, TEST_EQUAL_DOUBLE, TEST_REL, and Xapian::LatLongMetric::unserialise().
DEFINE_TESTCASE | ( | latlongmetric2 | , |
! | backend | ||
) |
Definition at line 368 of file api_geospatial.cc.
References Xapian::LatLongCoord::latitude, Xapian::LatLongCoord::longitude, Xapian::LatLongCoord::serialise(), Xapian::LatLongCoords::serialise(), TEST_EQUAL, and Xapian::LatLongCoord::unserialise().
DEFINE_TESTCASE | ( | latlongkeymaker1 | , |
! | backend | ||
) |
Definition at line 391 of file api_geospatial.cc.
References Xapian::Document::add_value(), Xapian::LatLongCoords::append(), Xapian::LatLongCoord::serialise(), Xapian::LatLongCoords::serialise(), TEST_EQUAL, and TEST_REL.