| 36 | namespace coding |
| 37 | { |
| 38 | bool TestDecoding(InPointsT const & points, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 39 | OutDeltasT const & deltas, |
| 40 | void (*fnDecode)(InDeltasT const & deltas, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 41 | OutPointsT & points)) |
| 42 | { |
| 43 | size_t const count = points.size(); |
| 44 | |
| 45 | std::vector<m2::PointU> decoded; |
| 46 | decoded.resize(count); |
| 47 | |
| 48 | OutPointsT decodedA(decoded); |
| 49 | fnDecode(make_read_adapter(deltas), basePoint, maxPoint, decodedA); |
| 50 | |
| 51 | for (size_t i = 0; i < count; ++i) |
| 52 | ASSERT_EQUAL(points[i], decoded[i], ()); |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | m2::PointU PredictPointInPolyline(m2::PointD const & maxPoint, m2::PointU const & p1, m2::PointU const & p2) |
| 57 | { |
no test coverage detected