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
2016-01-21 20:01:20 +01:00

39 lines
621 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<20, GP> g;
Grid<20, GP> gInv;
GridFactory<20, 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<20, GP> gfInv(gInv);
gfInv.addInverted(g, 20);
gfInv.addInverted(g, 340);
// plot(gInv);
}
#endif