KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_bus_migration_precondition.cpp File Reference

The migrate-buses prompt in SCH_EDIT_FRAME::OpenProjectFiles() is gated on ConnectionGraph::GetBusesNeedingMigration(). More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <connection_graph.h>
#include <schematic.h>
#include <sch_label.h>
#include <sch_line.h>
#include <sch_screen.h>
#include <sch_sheet.h>
#include <settings/settings_manager.h>

Go to the source code of this file.

Classes

struct  BUS_MIGRATION_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (MigrationDataOnlyExistsAfterRecalculate, BUS_MIGRATION_FIXTURE)
 

Detailed Description

The migrate-buses prompt in SCH_EDIT_FRAME::OpenProjectFiles() is gated on ConnectionGraph::GetBusesNeedingMigration().

That list is only populated by a connection-graph recalculation; ConnectionGraph::Reset() clears it. The prompt must therefore be evaluated after RecalculateConnections(), not between Reset() and the recalculation, or it can never fire for a file that genuinely needs it.

The dialog itself is quasi-modal GUI and cannot run headless, so this test locks down the structural precondition instead. A bus subgraph carrying two differently named vector bus labels is reported only while the graph is populated, never after a Reset().

Definition in file test_bus_migration_precondition.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE()