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

Function UNIT_TEST

libs/editor/editor_tests/match_by_geometry_test.cpp:139–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137)XXX";
138
139UNIT_TEST(MatchByGeometry)
140{
141 pugi::xml_document osmResponse;
142 TEST(osmResponse.load_buffer(kSenatskiyDvorets.c_str(), kSenatskiyDvorets.size()), ());
143
144 // It is a triangulated polygon. Every triangle is presented as three points.
145 // For simplification, you can visualize it as a single sequence of points
146 // by using, for ex. Gnuplot.
147 std::vector<m2::PointD> geometry = {
148 {37.621818614168603, 67.468231078000599}, {37.621858847304139, 67.468292768808396},
149 {37.621783745451154, 67.468236442418657}, {37.621783745451154, 67.468236442418657},
150 {37.621858847304139, 67.468292768808396}, {37.621840071840893, 67.468327637525846},
151 {37.621783745451154, 67.468236442418657}, {37.621840071840893, 67.468327637525846},
152 {37.620694768582979, 67.46837323507944}, {37.621783745451154, 67.468236442418657},
153 {37.620694768582979, 67.46837323507944}, {37.620887887633501, 67.46797626814228},
154 {37.620887887633501, 67.46797626814228}, {37.620694768582979, 67.46837323507944},
155 {37.620826196825703, 67.467957492679034}, {37.621783745451154, 67.468236442418657},
156 {37.620887887633501, 67.46797626814228}, {37.621625495118082, 67.467576618996077},
157 {37.621625495118082, 67.467576618996077}, {37.620887887633501, 67.46797626814228},
158 {37.621373367468806, 67.467496152725033}, {37.621373367468806, 67.467496152725033},
159 {37.620887887633501, 67.46797626814228}, {37.621365320841704, 67.467439826335323},
160 {37.621373367468806, 67.467496152725033}, {37.621365320841704, 67.467439826335323},
161 {37.621386778513994, 67.467447872962424}, {37.621783745451154, 67.468236442418657},
162 {37.621625495118082, 67.467576618996077}, {37.621869576140256, 67.467936035006772},
163 {37.621869576140256, 67.467936035006772}, {37.621625495118082, 67.467576618996077},
164 {37.621856165095096, 67.467691953984598}, {37.621856165095096, 67.467691953984598},
165 {37.621625495118082, 67.467576618996077}, {37.621966135665531, 67.467348631228134},
166 {37.621966135665531, 67.467348631228134}, {37.621625495118082, 67.467576618996077},
167 {37.621722054643357, 67.467270847166105}, {37.621966135665531, 67.467348631228134},
168 {37.621722054643357, 67.467270847166105}, {37.621880304976401, 67.46708309253367},
169 {37.621880304976401, 67.46708309253367}, {37.621722054643357, 67.467270847166105},
170 {37.621445787112748, 67.467185016477004}, {37.621880304976401, 67.46708309253367},
171 {37.621445787112748, 67.467185016477004}, {37.621236574808023, 67.466879244647032},
172 {37.621236574808023, 67.466879244647032}, {37.621445787112748, 67.467185016477004},
173 {37.621365320841704, 67.467439826335323}, {37.621236574808023, 67.466879244647032},
174 {37.621365320841704, 67.467439826335323}, {37.620887887633501, 67.46797626814228},
175 {37.621966135665531, 67.467348631228134}, {37.621880304976401, 67.46708309253367},
176 {37.622068059608836, 67.46738081773654}, {37.622068059608836, 67.46738081773654},
177 {37.621880304976401, 67.46708309253367}, {37.622121703789531, 67.466683443387467},
178 {37.622121703789531, 67.466683443387467}, {37.621880304976401, 67.46708309253367},
179 {37.622019779846227, 67.466648574670018}, {37.622068059608836, 67.46738081773654},
180 {37.622121703789531, 67.466683443387467}, {37.622078788444981, 67.467426415290134},
181 {37.621869576140256, 67.467936035006772}, {37.621856165095096, 67.467691953984598},
182 {37.622033190891386, 67.467748280374309}, {37.621869576140256, 67.467936035006772},
183 {37.622033190891386, 67.467748280374309}, {37.622041237518488, 67.467981632560367},
184 {37.622041237518488, 67.467981632560367}, {37.622033190891386, 67.467748280374309},
185 {37.62210024611727, 67.467734869329149}, {37.622041237518488, 67.467981632560367},
186 {37.62210024611727, 67.467734869329149}, {37.622344327139444, 67.468314226480686},
187 {37.622344327139444, 67.468314226480686}, {37.62210024611727, 67.467734869329149},
188 {37.622078788444981, 67.467426415290134}, {37.622078788444981, 67.467426415290134},
189 {37.62210024611727, 67.467734869329149}, {37.622060012981734, 67.46746664842567},
190 {37.622344327139444, 67.468314226480686}, {37.622078788444981, 67.467426415290134},
191 {37.622121703789531, 67.466683443387467}, {37.622041237518488, 67.467981632560367},
192 {37.622344327139444, 67.468314226480686}, {37.622092199490169, 67.468252535672889},
193 {37.622092199490169, 67.468252535672889}, {37.622344327139444, 67.468314226480686},
194 {37.622049284145589, 67.468392010542686}, {37.622049284145589, 67.468392010542686},
195 {37.622344327139444, 67.468314226480686}, {37.622188759015415, 67.468845303869585},
196 {37.622049284145589, 67.468392010542686}, {37.622188759015415, 67.468845303869585},

Callers

nothing calls this directly

Calls 4

TESTFunction · 0.85
GetBestOsmWayOrRelationFunction · 0.85
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected