Follow up fix: added tests files and registered A* tests.
This commit is contained in:
parent
94f0d11b6f
commit
895b8b0e01
7 changed files with 15 additions and 0 deletions
BIN
data/route_test1.mwm
Normal file
BIN
data/route_test1.mwm
Normal file
Binary file not shown.
BIN
data/route_test1.osm.bz2
Normal file
BIN
data/route_test1.osm.bz2
Normal file
Binary file not shown.
BIN
data/route_test2.mwm
Normal file
BIN
data/route_test2.mwm
Normal file
Binary file not shown.
BIN
data/route_test2.osm.bz2
Normal file
BIN
data/route_test2.osm.bz2
Normal file
Binary file not shown.
|
@ -7,6 +7,8 @@
|
|||
#include "../features_road_graph.hpp"
|
||||
#include "../route.hpp"
|
||||
|
||||
#include "../../indexer/classificator_loader.hpp"
|
||||
|
||||
#include "../../base/logging.hpp"
|
||||
#include "../../base/macros.hpp"
|
||||
|
||||
|
@ -67,6 +69,8 @@ void TestAStarRouterMWM(RoadPos (&finalPos)[finalPosSize],
|
|||
|
||||
UNIT_TEST(AStar_Router_City_Simple)
|
||||
{
|
||||
classificator::Load();
|
||||
|
||||
// Uncomment to see debug log.
|
||||
//my::g_LogLevel = LDEBUG;
|
||||
|
||||
|
@ -90,6 +94,8 @@ UNIT_TEST(AStar_Router_City_Simple)
|
|||
|
||||
UNIT_TEST(AStar_Router_City_ReallyFunnyLoop)
|
||||
{
|
||||
classificator::Load();
|
||||
|
||||
// Uncomment to see debug log.
|
||||
//my::g_LogLevel = LDEBUG;
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "../features_road_graph.hpp"
|
||||
#include "../route.hpp"
|
||||
|
||||
#include "../../indexer/classificator_loader.hpp"
|
||||
|
||||
#include "../../base/logging.hpp"
|
||||
#include "../../base/macros.hpp"
|
||||
|
||||
|
@ -25,7 +27,9 @@ void TestDijkstraRouterMock(RoadPos (&finalPos)[finalPosSize],
|
|||
InitRoadGraphMockSourceWithTest2(*graph);
|
||||
|
||||
DijkstraRouter router;
|
||||
|
||||
router.SetRoadGraph(graph);
|
||||
|
||||
router.SetFinalRoadPos(vector<RoadPos>(&finalPos[0], &finalPos[0] + ARRAY_SIZE(finalPos)));
|
||||
vector<RoadPos> result;
|
||||
router.CalculateRoute(vector<RoadPos>(&startPos[0], &startPos[0] + ARRAY_SIZE(startPos)), result);
|
||||
|
@ -67,6 +71,8 @@ void TestDijkstraRouterMWM(RoadPos (&finalPos)[finalPosSize],
|
|||
|
||||
UNIT_TEST(Dijkstra_Router_City_Simple)
|
||||
{
|
||||
classificator::Load();
|
||||
|
||||
// Uncomment to see debug log.
|
||||
//my::g_LogLevel = LDEBUG;
|
||||
|
||||
|
@ -90,6 +96,8 @@ UNIT_TEST(Dijkstra_Router_City_Simple)
|
|||
|
||||
UNIT_TEST(Dijkstra_Router_City_ReallyFunnyLoop)
|
||||
{
|
||||
classificator::Load();
|
||||
|
||||
// Uncomment to see debug log.
|
||||
//my::g_LogLevel = LDEBUG;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ win32* : LIBS *= -lShell32
|
|||
|
||||
SOURCES += \
|
||||
../../testing/testingmain.cpp \
|
||||
astar_router_test.cpp \
|
||||
cross_routing_tests.cpp \
|
||||
dijkstra_router_test.cpp \
|
||||
features_road_graph_test.cpp \
|
||||
|
|
Reference in a new issue