| 17 | using namespace generator::tests_support; |
| 18 | |
| 19 | std::vector<feature::FeatureBuilder> MakeTestSet1() |
| 20 | { |
| 21 | std::vector<feature::FeatureBuilder> fbs; |
| 22 | { |
| 23 | feature::FeatureBuilder outline; |
| 24 | outline.AddPolygon({{0.0, 0.0}, {0.0, 10.0}, {10.0, 10.0}, {10.0, 0.0}}); |
| 25 | outline.AddOsmId(base::MakeOsmWay(1)); |
| 26 | outline.AddType(classif().GetTypeByPath({"building"})); |
| 27 | outline.AddType(classif().GetTypeByPath({"tourism", "attraction"})); |
| 28 | outline.SetArea(); |
| 29 | fbs.emplace_back(outline); |
| 30 | } |
| 31 | { |
| 32 | feature::FeatureBuilder buildingPart; |
| 33 | buildingPart.AddPolygon({{0.0, 0.0}, {0.0, 8.0}, {8.0, 8.0}, {8.0, 0.0}}); |
| 34 | buildingPart.AddOsmId(base::MakeOsmWay(2)); |
| 35 | buildingPart.AddType(classif().GetTypeByPath({"building:part"})); |
| 36 | buildingPart.SetArea(); |
| 37 | fbs.emplace_back(buildingPart); |
| 38 | } |
| 39 | { |
| 40 | feature::FeatureBuilder buildingPart; |
| 41 | buildingPart.AddPolygon({{0.0, 0.0}, {0.0, 7.0}, {7.0, 7.0}, {7.0, 0.0}}); |
| 42 | buildingPart.AddOsmId(base::MakeOsmWay(3)); |
| 43 | buildingPart.AddType(classif().GetTypeByPath({"building:part"})); |
| 44 | buildingPart.SetArea(); |
| 45 | fbs.emplace_back(buildingPart); |
| 46 | } |
| 47 | { |
| 48 | feature::FeatureBuilder buildingPart; |
| 49 | buildingPart.AddPolygon({{0.0, 0.0}, {0.0, 6.0}, {6.0, 6.0}, {6.0, 0.0}}); |
| 50 | buildingPart.AddOsmId(base::MakeOsmWay(4)); |
| 51 | buildingPart.AddType(classif().GetTypeByPath({"building:part"})); |
| 52 | buildingPart.SetArea(); |
| 53 | fbs.emplace_back(buildingPart); |
| 54 | } |
| 55 | |
| 56 | return fbs; |
| 57 | } |
| 58 | |
| 59 | void TestDepthNodeById(generator::hierarchy::HierarchyLinker::Node::Ptr const & tree, uint64_t id, size_t depth) |
| 60 | { |
no test coverage detected