96 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
97 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
98 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
103 ItemMap ancMap = MakeMap( anc );
105 ItemMap oursMap = MakeMap( ours );
107 ItemMap theirsMap = MakeMap( theirs );
110 auto out = applier.
Apply();
112 BOOST_REQUIRE_EQUAL( out.size(), 1 );
113 BOOST_CHECK( out[0]->
name == wxS(
"R" ) );
114 BOOST_CHECK( out[0]->side == wxS(
"ours" ) );
121 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
122 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
123 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
128 ItemMap ancMap = MakeMap( anc );
130 ItemMap oursMap = MakeMap( ours );
132 ItemMap theirsMap = MakeMap( theirs );
135 auto out = applier.
Apply();
137 BOOST_REQUIRE_EQUAL( out.size(), 1 );
138 BOOST_CHECK( out[0]->side == wxS(
"theirs" ) );
145 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
146 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
147 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
152 ItemMap ancMap = MakeMap( anc );
154 ItemMap oursMap = MakeMap( ours );
156 ItemMap theirsMap = MakeMap( theirs );
159 auto out = applier.
Apply();
161 BOOST_REQUIRE_EQUAL( out.size(), 1 );
162 BOOST_CHECK( out[0]->side == wxS(
"anc" ) );
171 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
173 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
178 ItemMap ancMap = MakeMap( anc );
180 ItemMap oursMap = MakeMap( ours );
182 ItemMap theirsMap = MakeMap( theirs );
185 auto out = applier.
Apply();
187 BOOST_CHECK( out.empty() );
194 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
195 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
196 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
201 ItemMap ancMap = MakeMap( anc );
203 ItemMap oursMap = MakeMap( ours );
205 ItemMap theirsMap = MakeMap( theirs );
208 auto out = applier.
Apply();
210 BOOST_CHECK( out.empty() );
218 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
219 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
220 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
225 ItemMap ancMap = MakeMap( anc );
227 ItemMap oursMap = MakeMap( ours );
229 ItemMap theirsMap = MakeMap( theirs );
232 auto out = applier.
Apply();
234 BOOST_REQUIRE_EQUAL( out.size(), 1 );
235 BOOST_CHECK( out[0]->side == wxS(
"anc" ) );
245 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
246 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
251 ItemMap ancMap = MakeMap( anc );
253 ItemMap oursMap = MakeMap( ours );
255 ItemMap theirsMap = MakeMap( theirs );
258 auto out = applier.
Apply();
260 BOOST_REQUIRE_EQUAL( out.size(), 1 );
261 BOOST_CHECK( out[0]->side == wxS(
"ours" ) );
273 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
278 ItemMap ancMap = MakeMap( anc );
280 ItemMap oursMap = MakeMap( ours );
282 ItemMap theirsMap = MakeMap( theirs );
285 auto out = applier.
Apply();
287 BOOST_REQUIRE_EQUAL( out.size(), 1 );
288 BOOST_CHECK( out[0]->side == wxS(
"theirs" ) );
297 ItemStore anc, ours, theirs;
302 ItemMap ancMap = MakeMap( anc );
304 ItemMap oursMap = MakeMap( ours );
306 ItemMap theirsMap = MakeMap( theirs );
309 auto out = applier.
Apply();
311 BOOST_CHECK( out.empty() );
320 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
321 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
322 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
327 ItemMap ancMap = MakeMap( anc );
329 ItemMap oursMap = MakeMap( ours );
331 ItemMap theirsMap = MakeMap( theirs );
334 auto out = applier.
Apply();
336 BOOST_REQUIRE_EQUAL( out.size(), 1 );
337 BOOST_CHECK( out[0]->side == wxS(
"ours" ) );
350 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
351 ItemStore ours{ { wxS(
"R" ), wxS(
"ours" ) } };
356 ItemMap ancMap = MakeMap( anc );
358 ItemMap oursMap = MakeMap( ours );
360 ItemMap theirsMap = MakeMap( theirs );
363 auto out = applier.
Apply();
365 BOOST_REQUIRE_EQUAL( out.size(), 1 );
366 BOOST_CHECK( out[0]->side == wxS(
"anc" ) );
375 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
376 ItemStore ours, theirs;
381 ItemMap ancMap = MakeMap( anc );
383 ItemMap oursMap = MakeMap( ours );
385 ItemMap theirsMap = MakeMap( theirs );
388 auto out = applier.
Apply();
390 BOOST_REQUIRE_EQUAL( out.size(), 1 );
391 BOOST_CHECK( out[0]->
name == wxS(
"R" ) );
399 ItemStore anc{ { wxS(
"C" ), wxS(
"anc" ) }, { wxS(
"A" ), wxS(
"anc" ) },
400 { wxS(
"B" ), wxS(
"anc" ) } };
401 ItemStore ours, theirs;
405 ItemMap ancMap = MakeMap( anc );
407 ItemMap oursMap = MakeMap( ours );
409 ItemMap theirsMap = MakeMap( theirs );
412 auto out = applier.
Apply();
414 BOOST_REQUIRE_EQUAL( out.size(), 3 );
415 BOOST_CHECK( out[0]->
name == wxS(
"A" ) );
416 BOOST_CHECK( out[1]->
name == wxS(
"B" ) );
417 BOOST_CHECK( out[2]->
name == wxS(
"C" ) );
425 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
426 ItemStore ours, theirs;
430 ItemMap ancMap = MakeMap( anc );
432 ItemMap oursMap = MakeMap( ours );
434 ItemMap theirsMap = MakeMap( theirs );
437 auto out = applier.
Apply();
439 BOOST_REQUIRE_EQUAL( out.size(), 1 );
440 anc[0].side = wxS(
"MUTATED" );
441 BOOST_CHECK( out[0]->side == wxS(
"anc" ) );
450 { wxS(
"Keep" ), wxS(
"anc" ) },
451 { wxS(
"DelMe" ), wxS(
"anc" ) },
452 { wxS(
"Anc" ), wxS(
"anc" ) },
453 { wxS(
"MergeProps" ), wxS(
"anc" ) },
456 { wxS(
"Keep" ), wxS(
"ours" ) },
457 { wxS(
"DelMe" ), wxS(
"ours" ) },
458 { wxS(
"Anc" ), wxS(
"ours" ) },
459 { wxS(
"OursOnly" ), wxS(
"ours" ) },
460 { wxS(
"MergeProps" ), wxS(
"ours" ) },
463 { wxS(
"Keep" ), wxS(
"theirs" ) },
464 { wxS(
"TheirsOnly" ), wxS(
"theirs" ) },
465 { wxS(
"MergeProps" ), wxS(
"theirs" ) },
476 ItemMap ancMap = MakeMap( anc );
478 ItemMap oursMap = MakeMap( ours );
480 ItemMap theirsMap = MakeMap( theirs );
483 auto out = applier.
Apply();
495 BOOST_REQUIRE_EQUAL( out.size(), 5 );
497 const TestItem* keep = Find( out, wxS(
"Keep" ) );
498 const TestItem* anc_pick = Find( out, wxS(
"Anc" ) );
499 const TestItem* ours_only = Find( out, wxS(
"OursOnly" ) );
500 const TestItem* theirs_one = Find( out, wxS(
"TheirsOnly" ) );
501 const TestItem* merge = Find( out, wxS(
"MergeProps" ) );
508 BOOST_CHECK( keep->side == wxS(
"anc" ) );
509 BOOST_CHECK( anc_pick->side == wxS(
"anc" ) );
510 BOOST_CHECK( ours_only->side == wxS(
"ours" ) );
511 BOOST_CHECK( theirs_one->side == wxS(
"theirs" ) );
512 BOOST_CHECK( merge->side == wxS(
"ours" ) );
513 BOOST_CHECK( Find( out, wxS(
"DelMe" ) ) ==
nullptr );
523 ItemStore anc{ { wxS(
"R" ), wxS(
"anc" ) } };
525 ItemStore theirs{ { wxS(
"R" ), wxS(
"theirs" ) } };
530 ItemMap ancMap = MakeMap( anc );
531 ItemMap oursMap = MakeMap( ours );
532 ItemMap theirsMap = MakeMap( theirs );
534 auto out = applier.
Apply();
536 BOOST_CHECK( out.empty() );
BOOST_CHECK_EQUAL(result, "25.4")