KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_sch_commit.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <boost/test/unit_test.hpp>
21#include <tool/tool_manager.h>
22#include <sch_commit.h>
23#include <sch_group.h>
24#include <sch_text.h>
25#include <sch_line.h>
26#include <sch_screen.h>
27#include <sch_label.h>
28#include <sch_symbol.h>
29#include <sch_pin.h>
30#include <sch_sheet_pin.h>
31#include <schematic.h>
32#include <connection_graph.h>
33#include <advanced_config.h>
38#include <scoped_set_reset.h>
39
40BOOST_AUTO_TEST_SUITE( SchCommit )
41
42BOOST_AUTO_TEST_CASE( RecursesThroughGroups )
43{
44 TOOL_MANAGER mgr;
45 SCH_COMMIT commit( &mgr );
46
47 SCH_TEXT t1;
48 SCH_TEXT t2;
50 group.AddItem( &t1 );
51 group.AddItem( &t2 );
52
53 commit.Stage( &group, CHT_MODIFY, nullptr, RECURSE_MODE::RECURSE );
54
55 BOOST_CHECK_EQUAL( commit.GetStatus( &t1 ), CHT_MODIFY );
56 BOOST_CHECK_EQUAL( commit.GetStatus( &t2 ), CHT_MODIFY );
57}
58
59BOOST_AUTO_TEST_CASE( ClearsSelectedByDragFlag )
60{
61 TOOL_MANAGER mgr;
62 SCH_COMMIT commit( &mgr );
63
65 text.SetFlags( SELECTED_BY_DRAG );
66 text.SetSelected();
67
68 commit.Stage( &text, CHT_MODIFY );
69
70 BOOST_CHECK( text.IsSelected() );
72}
73
74BOOST_AUTO_TEST_CASE( CommitCanDeferConnectivityUntilExplicitRebuild )
75{
76 auto& enabled = const_cast<ADVANCED_CFG&>( ADVANCED_CFG::GetCfg() ).m_ConnectivityEngine;
77 SCOPED_SET_RESET restore( enabled, enabled );
78
79 for( bool useEngine : { false, true } )
80 {
81 BOOST_TEST_CONTEXT( "engine=" << useEngine )
82 {
83 enabled = false;
84 SETTINGS_MANAGER settings;
85 std::unique_ptr<SCHEMATIC> schematic;
86 KI_TEST::LoadSchematic( settings, "netlists/multinetclasses/multinetclasses", schematic );
87 const SCH_SHEET_PATH path = schematic->Hierarchy().front();
88 SCH_SCREEN* screen = path.LastScreen();
89 SCH_LABEL* label = nullptr;
90
91 for( SCH_ITEM* item : screen->Items().OfType( SCH_LABEL_T ) )
92 {
93 auto* candidate = static_cast<SCH_LABEL*>( item );
94
95 if( candidate->GetText() == "NET_2" )
96 label = candidate;
97 }
98
99 BOOST_REQUIRE( label );
100 schematic->ConnectionGraph()->Reset();
101 schematic->Connectivity().Clear();
102 enabled = useEngine;
103 TOOL_MANAGER manager;
104 manager.SetEnvironment( schematic.get(), nullptr, nullptr, nullptr, nullptr );
105 SCH_COMMIT commit( &manager );
106 commit.Modify( label, screen );
107 label->SetText( "DEFERRED_CONNECTIVITY" );
108 commit.Push( "Rename label", SKIP_UNDO | SKIP_CONNECTIVITY );
109 BOOST_CHECK( commit.Empty() );
110 BOOST_CHECK_EQUAL( label->GetText(), "DEFERRED_CONNECTIVITY" );
111 BOOST_CHECK( schematic->ConnectionGraph()->GetNetMap().empty() );
112 schematic->RecalculateConnections( nullptr, GLOBAL_CLEANUP, &manager );
113 const auto name = label->GetConnectionName( &path );
115 BOOST_CHECK_EQUAL( *name, "/DEFERRED_CONNECTIVITY" );
116 }
117 }
118}
119
120BOOST_AUTO_TEST_CASE( RevertingCleanupRestoresMergedWireBeforeItsMove )
121{
122 SETTINGS_MANAGER settings;
123 std::unique_ptr<SCHEMATIC> schematic;
124 KI_TEST::LoadSchematic( settings, "issue12505", schematic );
125 SCH_SCREEN* screen = schematic->GetCurrentScreen();
126 auto* wire = dynamic_cast<SCH_LINE*>(
127 screen->GetConnectivityItem( KIID( "8d2c5f9b-5bc9-4d6f-9ddd-e2fce9531195" ) ) );
128 auto* other = dynamic_cast<SCH_LINE*>(
129 screen->GetConnectivityItem( KIID( "06af46a6-6f60-4f17-95ae-2a85a89f02a6" ) ) );
130 BOOST_REQUIRE( wire && other );
131 const VECTOR2I start = wire->GetStartPoint();
132 const VECTOR2I end = wire->GetEndPoint();
133 TOOL_MANAGER manager;
134 manager.SetEnvironment( schematic.get(), nullptr, nullptr, nullptr, nullptr );
135 SCH_COMMIT move( &manager );
136 move.Modify( wire, screen );
137 wire->Move( other->GetStartPoint() - start );
138 screen->Update( wire );
139 schematic->CleanUp( &move, screen );
140 BOOST_REQUIRE( !screen->CheckIfOnDrawList( wire ) );
141
142 move.Revert();
143 BOOST_CHECK( screen->CheckIfOnDrawList( wire ) );
144 BOOST_CHECK( wire->GetStartPoint() == start );
145 BOOST_CHECK( wire->GetEndPoint() == end );
146 BOOST_CHECK( !wire->HasFlag( STRUCT_DELETED ) );
147 BOOST_CHECK( screen->GetConnectivityItem( wire->m_Uuid ) == wire );
148}
149
150BOOST_AUTO_TEST_CASE( HeadlessCommitsRetainDirtyScreensAfterCleanup )
151{
152 auto& enabled = const_cast<ADVANCED_CFG&>( ADVANCED_CFG::GetCfg() ).m_ConnectivityEngine;
153 SCOPED_SET_RESET restore( enabled, enabled );
154
155 for( const auto& [backend, skipDirty] : { std::pair{ false, false }, std::pair{ true, false },
156 std::pair{ false, true }, std::pair{ true, true } } )
157 {
158 BOOST_TEST_CONTEXT( "engine=" << backend << ", skip dirty=" << skipDirty )
159 {
160 enabled = backend;
161 SETTINGS_MANAGER settings;
162 std::unique_ptr<SCHEMATIC> schematic;
163 KI_TEST::LoadSchematic( settings, "net_chains_four_nets", schematic );
164 SCH_SCREEN* screen = schematic->Hierarchy().front().LastScreen();
165 auto* wire = new SCH_LINE( VECTOR2I( -10000000, -10000000 ), LAYER_WIRE );
166 wire->SetEndPoint( VECTOR2I( -9000000, -10000000 ) );
167 screen->Append( wire );
168 schematic->RebuildConnectivity();
169 TOOL_MANAGER manager;
170 manager.SetEnvironment( schematic.get(), nullptr, nullptr, nullptr, nullptr );
171 screen->SetContentModified( false );
172 SCH_COMMIT commit( &manager );
173 commit.Modify( wire, screen );
174 wire->Move( VECTOR2I( 100000, 0 ) );
175 commit.Push( "Move wire", SKIP_UNDO | ( skipDirty ? SKIP_SET_DIRTY : 0 ) );
176 BOOST_CHECK_EQUAL( screen->IsContentModified(), !skipDirty );
177 }
178 }
179}
180
181BOOST_AUTO_TEST_CASE( NoOpWireCommitRestoresConnectivityFlags )
182{
183 auto& enabled = const_cast<ADVANCED_CFG&>( ADVANCED_CFG::GetCfg() ).m_ConnectivityEngine;
184 SCOPED_SET_RESET restore( enabled, enabled );
185
186 for( bool useEngine : { false, true } )
187 {
188 BOOST_TEST_CONTEXT( "engine=" << useEngine )
189 {
190 enabled = useEngine;
191 SETTINGS_MANAGER settings;
192 std::unique_ptr<SCHEMATIC> schematic;
193 KI_TEST::LoadSchematic( settings, "net_chains_four_nets", schematic );
194 schematic->RebuildConnectivity();
195 SCH_SCREEN* screen = schematic->Hierarchy().front().LastScreen();
196 SCH_LINE* wire = nullptr;
197
198 for( SCH_ITEM* item : screen->Items().OfType( SCH_LINE_T ) )
199 {
200 auto* line = static_cast<SCH_LINE*>( item );
201
202 if( line->IsWire() && !line->IsDangling() )
203 {
204 wire = line;
205 break;
206 }
207 }
208
209 BOOST_REQUIRE( wire );
210 const auto start = wire->GetStartPoint();
211 const auto end = wire->GetEndPoint();
212 const auto dump = [&]()
213 {
214 return useEngine ? SCH_CONNECTIVITY::Dump( *schematic, schematic->Connectivity() )
215 : SCH_CONNECTIVITY::Dump( *schematic );
216 };
217 const auto before = dump();
218 TOOL_MANAGER manager;
219 manager.SetEnvironment( schematic.get(), nullptr, nullptr, nullptr, nullptr );
220 SCH_COMMIT unchanged( &manager );
221 unchanged.Modify( wire, screen );
222 unchanged.Push( "Edit Wire", SKIP_UNDO );
223 BOOST_CHECK_EQUAL( dump(), before );
224
225 SCH_COMMIT commit( &manager );
226 commit.Modify( wire, screen );
227 // Mirrors SCH_MOVE_TOOL's preview and final update of the selected item
228 wire->SetDanglingState( true, true );
229 wire->SetConnectivityDirty();
230 commit.Push( "Move", SKIP_UNDO );
231 BOOST_CHECK( wire->GetStartPoint() == start );
232 BOOST_CHECK( wire->GetEndPoint() == end );
233 BOOST_CHECK( !wire->IsConnectivityDirty() );
234 BOOST_CHECK( !wire->IsStartDangling() );
235 BOOST_CHECK( !wire->IsEndDangling() );
236 BOOST_CHECK_EQUAL( dump(), before );
237
238 SCH_SYMBOL* symbol = nullptr;
239
240 for( SCH_ITEM* item : screen->Items().OfType( SCH_SYMBOL_T ) )
241 {
242 auto* candidate = static_cast<SCH_SYMBOL*>( item );
243
244 if( !candidate->GetGraphicalPins( ALL_UNITS, ALL_BODY_STYLES ).empty() )
245 {
246 symbol = candidate;
247 break;
248 }
249 }
250
251 BOOST_REQUIRE( symbol );
252 const auto position = symbol->GetPosition();
253 std::vector<bool> dangling;
254 SCH_COMMIT symbolCommit( &manager );
255 symbolCommit.Modify( symbol, screen );
256
258 {
259 dangling.push_back( pin->IsDangling() );
260 pin->SetIsDangling( !pin->IsDangling() );
261 }
262
263 symbol->SetConnectivityDirty();
264 symbolCommit.Push( "Move", SKIP_UNDO );
265 BOOST_CHECK( symbol->GetPosition() == position );
266 BOOST_CHECK( !symbol->IsConnectivityDirty() );
267
268 for( size_t i = 0; i < dangling.size(); ++i )
269 {
270 BOOST_CHECK_EQUAL( symbol->GetGraphicalPins( ALL_UNITS, ALL_BODY_STYLES )[i]->IsDangling(),
271 dangling[i] );
272 }
273
274 BOOST_CHECK_EQUAL( dump(), before );
275
276 SCH_COMMIT deferred( &manager );
277 deferred.Modify( wire, screen );
278 wire->SetDanglingState( true, true );
279 wire->SetConnectivityDirty();
280 deferred.Push( "Move", SKIP_UNDO | SKIP_CONNECTIVITY );
281 BOOST_CHECK( wire->IsConnectivityDirty() );
282 BOOST_CHECK( wire->IsStartDangling() );
283 BOOST_CHECK( wire->IsEndDangling() );
284 schematic->RebuildConnectivity();
285 BOOST_CHECK_EQUAL( dump(), before );
286
287 auto graphic = std::unique_ptr<SCH_LINE>( static_cast<SCH_LINE*>( wire->Duplicate( false ) ) );
288 graphic->SetLayer( LAYER_NOTES );
289 BOOST_REQUIRE( !graphic->IsConnectable() );
290 SCH_LINE* drawing = graphic.get();
291 screen->Append( graphic.release() );
292 schematic->RebuildConnectivity();
293 SCH_COMMIT drawingEdit( &manager );
294 drawingEdit.Modify( drawing, screen );
295 drawingEdit.Push( "Edit Line", SKIP_UNDO );
296 BOOST_CHECK_EQUAL( dump(), before );
297
298 SCH_COMMIT drawingRemoval( &manager );
299 drawingRemoval.Remove( drawing, screen );
300 drawingRemoval.Push( "Delete Line", SKIP_UNDO | DELETE_REMOVED_ITEMS );
301 BOOST_CHECK_EQUAL( dump(), before );
302 }
303 }
304}
305
306BOOST_AUTO_TEST_CASE( SheetPinCommitMatchesFullRebuild )
307{
308 auto& config = const_cast<ADVANCED_CFG&>( ADVANCED_CFG::GetCfg() );
309 SCOPED_SET_RESET restoreEngine( config.m_ConnectivityEngine, config.m_ConnectivityEngine );
310 SCOPED_SET_RESET restoreIncremental( config.m_IncrementalConnectivity, config.m_IncrementalConnectivity );
311 const auto check = [&]( const char* fixture, const wxString& pinText, size_t expectedParentInstances )
312 {
313 BOOST_TEST_CONTEXT( fixture )
314 {
315 for( bool useEngine : { false, true } )
316 {
317 BOOST_TEST_CONTEXT( "engine=" << useEngine )
318 {
319 config.m_ConnectivityEngine = useEngine;
320 config.m_IncrementalConnectivity = true;
321 SETTINGS_MANAGER settings;
322 std::unique_ptr<SCHEMATIC> schematic;
323 KI_TEST::LoadSchematic( settings, fixture, schematic );
324 TOOL_MANAGER manager;
325 manager.SetEnvironment( schematic.get(), nullptr, nullptr, nullptr, nullptr );
326 SCH_SCREEN* screen = nullptr;
327 SCH_SHEET_PIN* pin = nullptr;
328 size_t parentInstances = 0;
329
330 for( const SCH_SHEET_PATH& path : schematic->Hierarchy() )
331 {
332 for( SCH_ITEM* item : path.LastScreen()->Items().OfType( SCH_SHEET_T ) )
333 {
334 for( SCH_SHEET_PIN* candidate : static_cast<SCH_SHEET*>( item )->GetPins() )
335 {
336 if( candidate->GetText() == pinText )
337 {
338 if( pin )
339 BOOST_REQUIRE( candidate == pin );
340 else
341 schematic->SetCurrentSheet( path );
342
343 pin = candidate;
344 screen = path.LastScreen();
345 ++parentInstances;
346 }
347 }
348 }
349 }
350
352 BOOST_REQUIRE_EQUAL( parentInstances, expectedParentInstances );
353 schematic->RecalculateConnections( nullptr, GLOBAL_CLEANUP, &manager );
354 SCH_SHEET* owner = pin->GetParent();
355 const wxString originalText = pin->GetText();
356 const SCH_SHEET_LIST hierarchy = schematic->Hierarchy();
357
358 const auto dump =
359 [&]()
360 {
361 return useEngine ? SCH_CONNECTIVITY::Dump( *schematic, schematic->Connectivity() )
362 : SCH_CONNECTIVITY::Dump( *schematic );
363 };
364
365 const auto baseline = dump();
366
367 const VECTOR2I originalPosition = pin->GetPosition();
368 bool connectedEndpoint = false;
369
370 for( SCH_ITEM* item : screen->Items().OfType( SCH_LINE_T ) )
371 {
372 const auto* line = static_cast<SCH_LINE*>( item );
373
374 if( ( line->IsWire() || line->IsBus() )
375 && ( line->GetStartPoint() == originalPosition
376 || line->GetEndPoint() == originalPosition ) )
377 {
378 connectedEndpoint = true;
379 }
380 }
381
382 BOOST_REQUIRE( connectedEndpoint );
383 enum OPERATION { RENAME, MOVE, ADD_PIN };
384
385 for( OPERATION operation : { RENAME, MOVE, ADD_PIN } )
386 {
387 if( operation == ADD_PIN && ( !useEngine || expectedParentInstances != 1 ) )
388 continue;
389
390 SCH_SHEET_PIN* addedPin = nullptr;
391 std::unique_ptr<SCH_SHEET_PIN> removedPin;
392 BOOST_TEST_CONTEXT( "operation=" << operation )
393 {
394 for( bool restoring : { false, true } )
395 {
396 BOOST_TEST_CONTEXT( "restoring=" << restoring )
397 {
398 SCH_COMMIT commit( &manager );
399 commit.Modify( owner, screen );
400
401 if( operation == RENAME )
402 {
403 pin->SetText( restoring ? originalText
404 : wxString( "UNMATCHED_NATIVE_PORT" ) );
405 }
406 else if( operation == MOVE )
407 {
408 const VECTOR2I delta( 1000000, 1000000 );
409 owner->Move( delta * ( restoring ? -1 : 1 ) );
410 BOOST_CHECK_EQUAL( pin->GetPosition() == originalPosition, restoring );
411 }
412 else if( restoring )
413 {
414 owner->RemovePin( addedPin );
415 removedPin.reset();
416 }
417 else
418 {
419 auto duplicate = std::unique_ptr<SCH_SHEET_PIN>(
420 static_cast<SCH_SHEET_PIN*>( pin->Duplicate( false ) ) );
421 BOOST_REQUIRE( duplicate->m_Uuid != pin->m_Uuid );
422 addedPin = duplicate.get();
423 owner->AddPin( duplicate.release() );
424 }
425
426 commit.Push( "Edit Sheet Pin Properties", SKIP_UNDO );
427
428 BOOST_CHECK( schematic->Hierarchy() == hierarchy );
429 const auto edited = dump();
430
431 if( restoring )
432 BOOST_CHECK_EQUAL( edited, baseline );
433 else
434 BOOST_CHECK( edited != baseline );
435
436 schematic->RebuildConnectivity();
437 BOOST_CHECK_EQUAL( dump(), edited );
438 }
439 }
440 }
441 }
442 }
443 }
444 }
445 };
446 check( "issue9673/issue9673", wxString( "INT" ), 1 );
447 check( "netlists/hierarchy_aliases/hierarchy_aliases", wxString( "{ALIAS2}" ), 2 );
448}
449
const char * name
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
bool IsContentModified() const
Definition base_screen.h:56
void SetContentModified(bool aModified=true)
Definition base_screen.h:55
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
Definition commit.h:86
bool Empty() const
Definition commit.h:145
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Definition commit.h:102
int GetStatus(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Returns status of an item.
Definition commit.cpp:235
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition eda_text.h:118
virtual void SetText(const wxString &aText)
Definition eda_text.cpp:236
EE_TYPE OfType(KICAD_T aType) const
Definition sch_rtree.h:248
Definition kiid.h:46
Commit for the schematic and symbol editors.
Definition sch_commit.h:54
COMMIT & Stage(EDA_ITEM *aItem, CHANGE_TYPE aChangeType, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE) override
Add a change of the item aItem of type aChangeType to the change list.
void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
A set of SCH_ITEMs (i.e., without duplicates).
Definition sch_group.h:48
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:170
SCH_ITEM * Duplicate(bool addToParentGroup, SCH_COMMIT *aCommit=nullptr, bool aDoClone=false) const
Routine to create a new copy of given item.
Definition sch_item.cpp:191
void SetConnectivityDirty(bool aDirty=true)
Set the dirty flag.
Definition sch_item.cpp:314
bool IsConnectivityDirty() const
Definition sch_item.h:630
std::optional< wxString > GetConnectionName(const SCH_SHEET_PATH *aSheet=nullptr, bool aLocal=false, bool aIgnoreSheet=false) const
Return the active connection name; absent for missing or stale published rows.
Definition sch_item.cpp:629
Segment description base class to describe items which have 2 end points (track, wire,...
Definition sch_line.h:39
bool IsStartDangling() const
Definition sch_line.h:334
VECTOR2I GetEndPoint() const
Definition sch_line.h:145
VECTOR2I GetStartPoint() const
Definition sch_line.h:136
bool IsEndDangling() const
Definition sch_line.h:335
void SetDanglingState(bool aStart, bool aEnd)
Definition sch_line.h:328
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:122
SCH_ITEM * GetConnectivityItem(const KIID &aId) const
Resolve a drawing item or a connectable child on this screen; ambiguous IDs return null.
void Update(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
Refresh a changed item in the tree and invalidate connectivity.
bool CheckIfOnDrawList(const SCH_ITEM *aItem) const
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
void RemovePin(const SCH_SHEET_PIN *aSheetPin)
Remove aSheetPin from the sheet.
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
Schematic symbol object.
Definition sch_symbol.h:73
VECTOR2I GetPosition() const override
Definition sch_symbol.h:895
std::vector< SCH_PIN * > GetGraphicalPins(int aUnit, int aBodyStyle) const override
RAII class that sets an value at construction and resets it to the original value at destruction.
Master controller class:
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, APP_SETTINGS_BASE *aSettings, TOOLS_HOLDER *aFrame)
Set the work environment (model, view, view controls and the parent window).
@ CHT_MODIFY
Definition commit.h:40
@ RECURSE
Definition eda_item.h:51
#define SELECTED_BY_DRAG
Item was algorithmically selected as a dragged item.
#define STRUCT_DELETED
flag indication structures to be erased
@ LAYER_WIRE
Definition layer_ids.h:474
@ LAYER_NOTES
Definition layer_ids.h:489
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::string Dump(SCHEMATIC &aSchematic)
Canonical, pointer-free connectivity rows for migration and rebuild comparisons.
#define SKIP_CONNECTIVITY
Definition sch_commit.h:41
#define SKIP_SET_DIRTY
Definition sch_commit.h:40
#define DELETE_REMOVED_ITEMS
Definition sch_commit.h:43
#define SKIP_UNDO
Definition sch_commit.h:38
Class to handle a set of SCH_ITEMs.
@ GLOBAL_CLEANUP
Definition schematic.h:95
#define ALL_UNITS
Definition symbol.h:150
#define ALL_BODY_STYLES
Definition symbol.h:151
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
std::string path
KIBIS_PIN * pin
BOOST_AUTO_TEST_CASE(RecursesThroughGroups)
VECTOR2I end
BOOST_TEST_CONTEXT("Test Clearance")
BOOST_CHECK_EQUAL(result, "25.4")
int delta
wxString dump(const wxArrayString &aArray)
Debug helper for printing wxArrayString contents.
@ SCH_LINE_T
Definition typeinfo.h:159
@ SCH_SYMBOL_T
Definition typeinfo.h:168
@ SCH_LABEL_T
Definition typeinfo.h:163
@ SCH_SHEET_T
Definition typeinfo.h:171
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708