| 900 | } |
| 901 | |
| 902 | void EditorTest::LoadMapEditsTest() |
| 903 | { |
| 904 | auto & editor = osm::Editor::Instance(); |
| 905 | |
| 906 | auto const gbMwmId = BuildMwm("GB", [](TestMwmBuilder & builder) |
| 907 | { |
| 908 | builder.Add(TestCafe(m2::PointD(0.0, 0.0), "London Cafe", "en")); |
| 909 | builder.Add(TestCafe(m2::PointD(1.0, 1.0), "London Cafe", "en")); |
| 910 | |
| 911 | builder.Add(TestPOI(m2::PointD(100, 100), "Corner Post", "default")); |
| 912 | }); |
| 913 | |
| 914 | auto const rfMwmId = BuildMwm("RF", [](TestMwmBuilder & builder) |
| 915 | { |
| 916 | builder.Add(TestCafe(m2::PointD(2.0, 2.0), "Moscow Cafe1", "en")); |
| 917 | builder.Add(TestCafe(m2::PointD(7.0, 7.0), "Moscow Cafe2", "en")); |
| 918 | builder.Add(TestCafe(m2::PointD(4.0, 4.0), "Moscow Cafe3", "en")); |
| 919 | builder.Add(TestCafe(m2::PointD(6.0, 6.0), "Moscow Cafe4", "en")); |
| 920 | |
| 921 | builder.Add(TestPOI(m2::PointD(100, 100), "Corner Post", "default")); |
| 922 | }); |
| 923 | |
| 924 | std::vector<FeatureID> features; |
| 925 | |
| 926 | ForEachCafeAtPoint(m_dataSource, m2::PointD(0.0, 0.0), [&features](FeatureType & ft) |
| 927 | { |
| 928 | SetBuildingLevelsToOne(ft); |
| 929 | features.emplace_back(ft.GetID()); |
| 930 | }); |
| 931 | |
| 932 | ForEachCafeAtPoint(m_dataSource, m2::PointD(1.0, 1.0), [&editor, &features](FeatureType & ft) |
| 933 | { |
| 934 | editor.DeleteFeature(ft.GetID()); |
| 935 | features.emplace_back(ft.GetID()); |
| 936 | }); |
| 937 | |
| 938 | ForEachCafeAtPoint(m_dataSource, m2::PointD(2.0, 2.0), [&editor, &features](FeatureType & ft) |
| 939 | { |
| 940 | editor.MarkFeatureAsObsolete(ft.GetID()); |
| 941 | features.emplace_back(ft.GetID()); |
| 942 | }); |
| 943 | |
| 944 | ForEachCafeAtPoint(m_dataSource, m2::PointD(7.0, 7.0), [&features](FeatureType & ft) |
| 945 | { |
| 946 | SetBuildingLevelsToOne(ft); |
| 947 | features.emplace_back(ft.GetID()); |
| 948 | }); |
| 949 | |
| 950 | ForEachCafeAtPoint(m_dataSource, m2::PointD(4.0, 4.0), [&editor, &features](FeatureType & ft) |
| 951 | { |
| 952 | editor.DeleteFeature(ft.GetID()); |
| 953 | features.emplace_back(ft.GetID()); |
| 954 | }); |
| 955 | |
| 956 | ForEachCafeAtPoint(m_dataSource, m2::PointD(6.0, 6.0), [&features](FeatureType & ft) |
| 957 | { |
| 958 | SetBuildingLevelsToOne(ft); |
| 959 | features.emplace_back(ft.GetID()); |
nothing calls this directly
no test coverage detected