| 130 | struct GraphFixture |
| 131 | { |
| 132 | GraphFixture(const std::vector<std::pair<FloatLongitude, FloatLatitude>> &input_coords, |
| 133 | const std::vector<std::tuple<unsigned, unsigned, bool>> &input_edges) |
| 134 | { |
| 135 | |
| 136 | for (unsigned i = 0; i < input_coords.size(); i++) |
| 137 | { |
| 138 | coords.emplace_back(input_coords[i].first, input_coords[i].second); |
| 139 | } |
| 140 | |
| 141 | for (const auto &pair : input_edges) |
| 142 | { |
| 143 | TestData d; |
| 144 | d.u = std::get<0>(pair); |
| 145 | d.v = std::get<1>(pair); |
| 146 | // We set the forward nodes to the target node-based-node IDs, just |
| 147 | // so we have something to test against. Because this isn't a real |
| 148 | // graph, the actual values aren't important, we just need something |
| 149 | // to examine during tests. |
| 150 | d.forward_segment_id = {std::get<1>(pair), true}; |
| 151 | d.reverse_segment_id = {std::get<0>(pair), true}; |
| 152 | d.fwd_segment_position = 0; |
| 153 | d.is_startpoint = std::get<2>(pair); |
| 154 | edges.emplace_back(d); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | std::vector<Coordinate> coords; |
| 159 | std::vector<TestData> edges; |
nothing calls this directly
no test coverage detected