KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_stacked_pin_netlist.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <netlist_reader/pcb_netlist.h>
#include <lib_id.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>
#include <project.h>
#include <settings/settings_manager.h>
#include <wx/log.h>
#include <qa_utils/utility_registry.h>
#include <reporter.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (TestStackedPinNetMatch)
 Test that COMPONENT::GetNet properly handles stacked pin notation like [8,9,10] and finds individual pin numbers within the stacked group.
 
 BOOST_AUTO_TEST_CASE (TestStackedPinRangeMatch)
 Test stacked pin notation with range syntax [1-4].
 
 BOOST_AUTO_TEST_CASE (TestStackedPinMixedMatch)
 Test mixed notation [1,3,5-7].
 
 BOOST_AUTO_TEST_CASE (TestRegularPinMatch)
 Test that regular (non-stacked) pin names still work.
 
 BOOST_AUTO_TEST_CASE (TestStackedProjectNetlistUpdate)
 This test creates a mock netlist that matches the stacked project structure and validates that PCB pad lookups work correctly with stacked pin notation.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( TestRegularPinMatch )

Test that regular (non-stacked) pin names still work.

Definition at line 152 of file test_stacked_pin_netlist.cpp.

References COMPONENT::AddNet(), BOOST_CHECK_EQUAL(), COMPONENT::GetNet(), COMPONENT_NET::GetNetName(), COMPONENT_NET::IsValid(), and path.

◆ BOOST_AUTO_TEST_CASE() [2/5]

BOOST_AUTO_TEST_CASE ( TestStackedPinMixedMatch )

◆ BOOST_AUTO_TEST_CASE() [3/5]

BOOST_AUTO_TEST_CASE ( TestStackedPinNetMatch )

Test that COMPONENT::GetNet properly handles stacked pin notation like [8,9,10] and finds individual pin numbers within the stacked group.

Definition at line 45 of file test_stacked_pin_netlist.cpp.

References COMPONENT::AddNet(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), COMPONENT::GetNet(), COMPONENT_NET::GetNetName(), COMPONENT_NET::IsValid(), and path.

◆ BOOST_AUTO_TEST_CASE() [4/5]

BOOST_AUTO_TEST_CASE ( TestStackedPinRangeMatch )

Test stacked pin notation with range syntax [1-4].

Definition at line 84 of file test_stacked_pin_netlist.cpp.

References COMPONENT::AddNet(), BOOST_CHECK_EQUAL(), COMPONENT::GetNet(), COMPONENT_NET::GetNetName(), COMPONENT_NET::IsValid(), and path.

◆ BOOST_AUTO_TEST_CASE() [5/5]

BOOST_AUTO_TEST_CASE ( TestStackedProjectNetlistUpdate )

This test creates a mock netlist that matches the stacked project structure and validates that PCB pad lookups work correctly with stacked pin notation.

Definition at line 180 of file test_stacked_pin_netlist.cpp.

References COMPONENT::AddNet(), BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), COMPONENT::GetNet(), COMPONENT::GetNetCount(), COMPONENT_NET::GetNetName(), COMPONENT_NET::GetPinName(), COMPONENT_NET::IsValid(), path, and pin.