24#include <boost/test/unit_test.hpp>
42 std::vector<PROPERTY_DELTA> deltas;
45 BOOST_CHECK( deltas.empty() );
54 std::vector<PROPERTY_DELTA> deltas;
57 BOOST_REQUIRE_EQUAL( deltas.size(), 1u );
80 std::vector<PROPERTY_DELTA> deltas;
83 BOOST_REQUIRE_EQUAL( deltas.size(), 1u );
101 std::vector<PROPERTY_DELTA> deltas;
104 BOOST_REQUIRE_EQUAL( deltas.size(), 2u );
116 std::vector<PROPERTY_DELTA> deltas;
118 preExisting.
name = wxS(
"Sentinel" );
119 deltas.push_back( preExisting );
125 BOOST_REQUIRE_EQUAL( deltas.size(), 2u );
126 BOOST_CHECK( deltas[0].
name == wxS(
"Sentinel" ) );
139 std::vector<PROPERTY_DELTA> deltas;
142 BOOST_CHECK( deltas.empty() );
153 after.
SetTitle( wxS(
"Board v2" ) );
155 after.
SetComment( 2, wxS(
"third, edited" ) );
157 std::vector<PROPERTY_DELTA> deltas;
160 BOOST_REQUIRE_EQUAL( deltas.size(), 3u );
176 source.SetTitle( wxS(
"Theirs" ) );
177 source.SetRevision( wxS(
"C" ) );
Describe the page size and margins of a paper page on which to eventually print or plot.
wxString GetTypeAsString() const
const PAGE_SIZE_TYPE & GetType() const
Hold the information shown in the lower right corner of a plot, printout, or editing view.
void SetRevision(const wxString &aRevision)
void SetComment(int aIdx, const wxString &aComment)
const wxString & GetRevision() const
void SetTitle(const wxString &aTitle)
const wxString & GetTitle() const
wxString DocPropComment(int aIndex)
bool ApplyTitleBlockProperty(TITLE_BLOCK &aTarget, const wxString &aName, const TITLE_BLOCK &aSource)
Copy the title block field named by a document property from aSource into aTarget.
const wxString DOC_PROP_PAGE_FORMAT
Property-name keys for the synthetic document-level ITEM_CHANGE (empty KIID_PATH).
const wxString DOC_PROP_REVISION
void AppendTitleBlockDeltas(std::vector< PROPERTY_DELTA > &aDeltas, const TITLE_BLOCK &aBefore, const TITLE_BLOCK &aAfter)
Append a delta for every title block field that differs between the two documents,...
const wxString DOC_PROP_PAGE_ORIENTATION
void AppendPaperDeltas(std::vector< PROPERTY_DELTA > &aDeltas, const PAGE_INFO &aBefore, const PAGE_INFO &aAfter)
Append DOC_PROP_PAGE_FORMAT and/or DOC_PROP_PAGE_ORIENTATION deltas to aDeltas when the two PAGE_INFO...
const wxString DOC_PROP_TITLE
Title block fields. The comments are numbered from one, as the page settings dialog shows them.
Single (name, before, after) triple for one mutated property on an item.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(AppendPaperDeltas_IdenticalProducesNoDeltas)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")