This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/tests/grid/TestGridFactory.cpp
kazu 5aedce47f1 removed gridSize from the template arguments
- not needed and code much cleaner
some minor changes
new test-cases
2016-01-25 15:53:12 +01:00

39 lines
613 B
C++
Executable File

#ifdef WITH_TESTS
#include "../Tests.h"
#include "../../grid/factory/GridFactory.h"
#include "../../floorplan/FloorplanFactorySVG.h"
#include "Plot.h"
TEST(GridFactory, create) {
Grid<GP> g(20);
Grid<GP> gInv(20);
GridFactory<GP> gf(g);
FloorplanFactorySVG fpf(getDataFile("fp1.svg"), 4);
Floor f1 = fpf.getFloor("1");
Floor f2 = fpf.getFloor("2");
Stairs s1_2 = fpf.getStairs("1_2");
gf.addFloor(f1, 20);
gf.addFloor(f2, 340);
gf.addStairs(s1_2, 20, 340);
gf.removeIsolated();
GridFactory<GP> gfInv(gInv);
gfInv.addInverted(g, 20);
gfInv.addInverted(g, 340);
//plot(gInv);
}
#endif