|
KiCad PCB EDA Suite
|
Test for issue #22286 - Pin alternate type not being applied after schematic load. More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include "eeschema_test_utils.h"#include <lib_symbol.h>#include <pin_type.h>#include <sch_pin.h>#include <sch_symbol.h>#include <wildcards_and_files_ext.h>Go to the source code of this file.
Classes | |
| class | TEST_ISSUE22286_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (PinAlternateTypeAfterSchematicLoad) | |
| Test that pin alternates are correctly applied after loading a schematic from disk. | |
| BOOST_AUTO_TEST_CASE (ConnectionGraphHandlesPinAlternateType) | |
| Verify the connection graph does NOT treat the pin as no-connect. | |
Test for issue #22286 - Pin alternate type not being applied after schematic load.
When a pin has an alternate function selected (like "8.pow" with type power_in), the pin TYPE should switch from the default (no_connect) to the alternate's type. This test verifies the fix by loading the actual reproduction schematic.
Definition in file test_issue22286_pin_alternate.cpp.
| BOOST_AUTO_TEST_CASE | ( | ConnectionGraphHandlesPinAlternateType | ) |
Verify the connection graph does NOT treat the pin as no-connect.
When pin 8 has type PT_POWER_IN (from alternate), it should NOT be marked as a no-connect in the connection graph. It will still get a "Net-(...)" name because it's on a regular connector (not a power symbol), but importantly it should NOT be prefixed with "unconnected-".
Definition at line 161 of file test_issue22286_pin_alternate.cpp.
References BOOST_REQUIRE(), SCH_PIN::GetDefaultNetName(), KI_TEST::GetEeschemaTestDataDir(), FILEEXT::KiCadSchematicFileExtension, LoadSchematic(), and path.
| BOOST_AUTO_TEST_CASE | ( | PinAlternateTypeAfterSchematicLoad | ) |
Test that pin alternates are correctly applied after loading a schematic from disk.
This test loads the actual reproduction schematic for issue #22286 and verifies that:
Definition at line 94 of file test_issue22286_pin_alternate.cpp.
References BOOST_AUTO_TEST_CASE(), ElectricalPinTypeGetText(), SCH_PIN::GetAlt(), SCH_PIN::GetAlternates(), KI_TEST::GetEeschemaTestDataDir(), SCH_PIN::GetLibPin(), SCH_PIN::GetShownName(), SCH_PIN::GetType(), FILEEXT::KiCadSchematicFileExtension, LoadSchematic(), SCH_PIN::ALT::m_Type, and PT_POWER_IN.