20#include <boost/test/unit_test.hpp>
38 auto rcItem = std::make_shared<RC_ITEM>();
44 marker->m_Children.push_back( child );
45 m_tree.push_back( marker );
52 m_tree.push_back( marker );
58 std::erase(
m_tree, aNode );
93 model.DetachTopLevel( marker );
95 wxDataViewItemArray children;
97 BOOST_CHECK( !
model.IsContainer( staleMarker ) );
98 BOOST_CHECK( !
model.GetParent( staleChild ).IsOk() );
100 BOOST_CHECK( children.empty() );
109 auto rcItem = std::make_shared<RC_ITEM>();
111 rcItem->SetParent( &marker );
117 model.ValueChanged( node );
121 model.ValueChanged( node );
123 BOOST_REQUIRE_EQUAL( node->
m_Children.size(), 1u );
A color representation with 4 components: red, green, blue, alpha.
void SetExcluded(bool aExcluded, const wxString &aComment=wxEmptyString)
MARKER_BASE(int aScalingFactor, std::shared_ptr< RC_ITEM > aItem, MARKER_T aType=MARKER_UNSPEC)
std::vector< RC_TREE_NODE * > m_tree
void retireNodeTree(RC_TREE_NODE *aNode)
static wxDataViewItem ToItem(RC_TREE_NODE const *aNode)
RC_TREE_MODEL(EDA_DRAW_FRAME *aParentFrame, wxDataViewCtrl *aView)
void deleteNodeTree(RC_TREE_NODE *aNode)
RC_TREE_NODE * createNode(RC_TREE_NODE *aParent, const std::shared_ptr< RC_ITEM > &aRcItem, RC_TREE_NODE::NODE_TYPE aType)
static KIID ToUUID(wxDataViewItem aItem)
std::vector< RC_TREE_NODE * > m_Children
const KIID GetUUID() const override
TEST_MARKER(std::shared_ptr< RC_ITEM > aItem)
KIGFX::COLOR4D getColor() const override
RC_TREE_NODE * AddItemlessMarker(const std::shared_ptr< RC_ITEM > &aRcItem)
RC_TREE_NODE * AddMarkerWithMainItem()
void DetachTopLevel(RC_TREE_NODE *aNode)
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(DetachedHandlesBehaveAsInvalid)
BOOST_CHECK_EQUAL(result, "25.4")