| 23 | using namespace tests; |
| 24 | |
| 25 | UNIT_CLASS_TEST(TestWithClassificator, FBuilder_ManyTypes) |
| 26 | { |
| 27 | FeatureBuilder fb1; |
| 28 | FeatureBuilderParams params; |
| 29 | |
| 30 | base::StringIL arr[] = { |
| 31 | {"building"}, |
| 32 | {"place", "country"}, |
| 33 | {"place", "state"}, |
| 34 | /// @todo Can't realize is it deprecated or we forgot to add clear styles for it. |
| 35 | //{ "place", "county" }, |
| 36 | {"place", "region"}, |
| 37 | {"place", "city"}, |
| 38 | {"place", "town"}, |
| 39 | }; |
| 40 | AddTypes(params, arr); |
| 41 | |
| 42 | params.FinishAddingTypes(); |
| 43 | params.SetHouseNumberAndHouseName("75", "Best House"); |
| 44 | params.AddName("default", "Name"); |
| 45 | |
| 46 | fb1.SetParams(params); |
| 47 | fb1.SetCenter(m2::PointD(0, 0)); |
| 48 | |
| 49 | TEST(fb1.RemoveInvalidTypes(), ()); |
| 50 | TEST(fb1.IsValid(), (fb1)); |
| 51 | |
| 52 | FeatureBuilder::Buffer buffer; |
| 53 | TEST(fb1.PreSerializeAndRemoveUselessNamesForIntermediate(), ()); |
| 54 | fb1.SerializeForIntermediate(buffer); |
| 55 | |
| 56 | FeatureBuilder fb2; |
| 57 | fb2.DeserializeFromIntermediate(buffer); |
| 58 | |
| 59 | TEST(fb2.IsValid(), (fb2)); |
| 60 | TEST_EQUAL(fb1, fb2, ()); |
| 61 | TEST_EQUAL(fb2.GetTypesCount(), 6, ()); |
| 62 | } |
| 63 | |
| 64 | UNIT_CLASS_TEST(TestWithClassificator, FBuilder_LineTypes) |
| 65 | { |
nothing calls this directly
no test coverage detected