MCPcopy Create free account
hub / github.com/comaps/comaps / IsCreatedFeatureTest

Method IsCreatedFeatureTest

libs/editor/editor_tests/osm_editor_test.cpp:768–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768void EditorTest::IsCreatedFeatureTest()
769{
770 auto & editor = osm::Editor::Instance();
771
772 auto const mwmId = ConstructTestMwm([](TestMwmBuilder & builder)
773 {
774 builder.Add(TestCafe(m2::PointD(1.0, 1.0), "London Cafe", "en"));
775
776 builder.Add(TestPOI(m2::PointD(10, 10), "Corner Post", "default"));
777 });
778
779 ForEachCafeAtPoint(m_dataSource, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft)
780 {
781 TEST(!editor.IsCreatedFeature(ft.GetID()), ());
782 SetBuildingLevelsToOne(ft);
783 TEST(!editor.IsCreatedFeature(ft.GetID()), ());
784 });
785
786 osm::EditableMapObject emo;
787 TEST(!editor.IsCreatedFeature(emo.GetID()), ());
788 CreateCafeAtPoint({2.0, 2.0}, mwmId, emo);
789 TEST(editor.IsCreatedFeature(emo.GetID()), ());
790}
791
792void EditorTest::ForEachFeatureInMwmRectAndScaleTest()
793{

Callers

nothing calls this directly

Calls 9

TestPOIClass · 0.85
ForEachCafeAtPointFunction · 0.85
TESTFunction · 0.85
SetBuildingLevelsToOneFunction · 0.85
CreateCafeAtPointFunction · 0.85
IsCreatedFeatureMethod · 0.80
TestCafeClass · 0.70
AddMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected