| 
    KiCad PCB EDA Suite
    
   | 
 
Test suite for the ERC ground pin checks (ERCE_GROUND_PIN_NOT_GROUND) More...
#include <qa_utils/wx_utils/unit_test_utils.h>#include <schematic_utils/schematic_file_util.h>#include <connection_graph.h>#include <schematic.h>#include <erc/erc_settings.h>#include <erc/erc.h>#include <erc/erc_report.h>#include <settings/settings_manager.h>#include <locale_io.h>Go to the source code of this file.
Classes | |
| struct | ERC_GROUND_PIN_TEST_FIXTURE | 
Functions | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinMismatch, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Test case: Pin with "GND" in its name connected to non-ground net while another pin in the same symbol is connected to a ground net.   | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinCorrect, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Test case: Pin with "GND" in its name correctly connected to ground net.   | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinMixed, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Test case: Symbol with multiple ground pins, some connected correctly, some not.   | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinNoGroundNet, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Test case: Symbol with ground-labeled pin but no ground net anywhere in the schematic.   | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinToggle, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Test case: Verify that the ground pin check is properly enabled/disabled.   | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinErrorMessage, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Test case: Verify error message content and pin identification.   | |
| BOOST_FIXTURE_TEST_CASE (ERCGroundPinComprehensive, ERC_GROUND_PIN_TEST_FIXTURE) | |
| Comprehensive test with all ground pin related test cases.   | |
Test suite for the ERC ground pin checks (ERCE_GROUND_PIN_NOT_GROUND)
This test verifies that the ERC correctly detects and reports when pins labeled with "GND" are not connected to a ground net while other pins in the same symbol are connected to ground nets.
Definition in file test_erc_ground_pins.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinComprehensive | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Comprehensive test with all ground pin related test cases.
This demonstrates the expected behavior of the ground pin ERC check.
Definition at line 378 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), ERC_REPORT::GetTextReport(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, MM, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), ERC_TESTER::TestGroundPins(), ERC_TESTER::TestMissingUnits(), ERC_TESTER::TestMultiunitFootprints(), ERC_TESTER::TestMultUnitPinConflicts(), ERC_TESTER::TestNoConnectPins(), ERC_TESTER::TestPinToPin(), and ERC_TESTER::TestSimilarLabels().
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinCorrect | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Test case: Pin with "GND" in its name correctly connected to ground net.
Expected: 0 ERCE_GROUND_PIN_NOT_GROUND errors
Definition at line 112 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), ERC_REPORT::GetTextReport(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, MM, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), and ERC_TESTER::TestGroundPins().
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinErrorMessage | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Test case: Verify error message content and pin identification.
Expected: Error message contains pin name and proper item identification
Definition at line 316 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), RC_ITEM::GetErrorMessage(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, niluuid, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), and ERC_TESTER::TestGroundPins().
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinMismatch | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Test case: Pin with "GND" in its name connected to non-ground net while another pin in the same symbol is connected to a ground net.
Expected: 1 ERCE_GROUND_PIN_NOT_GROUND error
Definition at line 58 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), ERC_REPORT::GetTextReport(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, MM, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), and ERC_TESTER::TestGroundPins().
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinMixed | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Test case: Symbol with multiple ground pins, some connected correctly, some not.
Expected: 1 ERCE_GROUND_PIN_NOT_GROUND error (for the incorrectly connected pin)
Definition at line 158 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), ERC_REPORT::GetTextReport(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, MM, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), and ERC_TESTER::TestGroundPins().
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinNoGroundNet | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Test case: Symbol with ground-labeled pin but no ground net anywhere in the schematic.
Expected: 0 ERCE_GROUND_PIN_NOT_GROUND errors (condition not triggered)
Definition at line 206 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), ERC_REPORT::GetTextReport(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, MM, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), and ERC_TESTER::TestGroundPins().
| BOOST_FIXTURE_TEST_CASE | ( | ERCGroundPinToggle | , | 
| ERC_GROUND_PIN_TEST_FIXTURE | ) | 
Test case: Verify that the ground pin check is properly enabled/disabled.
Expected: Errors only when the check is enabled
Definition at line 254 of file test_erc_ground_pins.cpp.
References dummy, ERCE_GROUND_PIN_NOT_GROUND, ERCE_LIB_SYMBOL_ISSUES, ERCE_LIB_SYMBOL_MISMATCH, SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), RC_ITEM::GetErrorCode(), SHEETLIST_ERC_ITEMS_PROVIDER::GetItem(), KI_TEST::LoadSchematic(), ERC_SETTINGS::m_ERCSeverities, RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities(), and ERC_TESTER::TestGroundPins().