40 mgr.SetEnvironment( &
board,
nullptr,
nullptr,
nullptr,
nullptr );
53 addCommit.
Push( wxT(
"add constraint" ) );
61 removeCommit.
Push( wxT(
"remove constraint" ) );
64 BOOST_CHECK( board.ResolveItem(
id,
true ) ==
nullptr );
89 addCommit.
Push( wxT(
"add" ) );
97 BOOST_CHECK_CLOSE( *c->
GetValue(), 1.0, 1e-9 );
void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
void Revert() override
Revert the commit by restoring the modified items state.
Information pertinent to a Pcbnew printed circuit board.
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
A geometric constraint between board items (issue #2329).
std::optional< double > GetValue() const
void SetValue(std::optional< double > aValue)
Test utilities for timestamps.
@ HORIZONTAL
A segment (or two points) is horizontal.
@ FIXED_LENGTH
A segment has a driving length value.
@ PARALLEL
Two segments are parallel.
KI_TEST::DUMMY_TOOL * tool
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_FIXTURE_TEST_CASE(AddPushThenRemovePush, COMMIT_FIXTURE)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_SUITE_END()