| 15 | using namespace feature; |
| 16 | |
| 17 | void ReadFeatures(std::string const & fName) |
| 18 | { |
| 19 | Classificator const & c = classif(); |
| 20 | |
| 21 | FeaturesVectorTest(fName).GetVector().ForEach([&](FeatureType & ft, uint32_t) |
| 22 | { |
| 23 | TypesHolder types(ft); |
| 24 | |
| 25 | std::vector<uint32_t> vTypes; |
| 26 | for (uint32_t t : types) |
| 27 | { |
| 28 | CHECK_EQUAL(c.GetTypeForIndex(c.GetIndexForType(t)), t, ()); |
| 29 | vTypes.push_back(t); |
| 30 | } |
| 31 | |
| 32 | sort(vTypes.begin(), vTypes.end()); |
| 33 | CHECK(unique(vTypes.begin(), vTypes.end()) == vTypes.end(), ()); |
| 34 | |
| 35 | m2::RectD const r = ft.GetLimitRect(FeatureType::BEST_GEOMETRY); |
| 36 | CHECK(r.IsValid(), ()); |
| 37 | |
| 38 | GeomType const type = ft.GetGeomType(); |
| 39 | if (type == GeomType::Line) |
| 40 | CHECK_GREATER(ft.GetPointsCount(), 1, ()); |
| 41 | |
| 42 | CHECK(CanGenerateLike(vTypes, ft.GetGeomType()), ()); |
| 43 | }); |
| 44 | |
| 45 | LOG(LINFO, ("OK")); |
| 46 | } |
| 47 | } // namespace check_model |
no test coverage detected