39 lines
613 B
C++
Executable File
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
|