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

Test suite for import of Altium PCB files. More...

Go to the source code of this file.

Classes

struct  ALTIUM_PCB_IMPORT_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (BoardLoadNoAssertions)
 Test basic board loading - verifies that the Altium import doesn't trigger any assertions during the load process.
 
 BOOST_AUTO_TEST_CASE (NetclassAssignment)
 Test that netclass pattern assignments result in direct netclass assignments on nets.
 
static void checkAllCopperFillZonesHaveClearance (PCB_IO_ALTIUM_DESIGNER &aPlugin, const std::string &aRelativePath)
 Verify that copper zones in imported Altium boards have non-zero local clearance values derived from rules whose scope expressions match polygons.
 
 BOOST_AUTO_TEST_CASE (ZoneClearances_eDP)
 
 BOOST_AUTO_TEST_CASE (ZoneClearances_HiFive)
 
 BOOST_AUTO_TEST_CASE (ScopeExprMatchesPolygon)
 Test altiumScopeExprMatchesPolygon utility function.
 
 BOOST_AUTO_TEST_CASE (SelectAltiumPolygonRule_PriorityOrder)
 Verify selectAltiumPolygonRule honours Altium priority order (1 = highest).
 

Detailed Description

Test suite for import of Altium PCB files.

Definition in file test_altium_pcb_import.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( BoardLoadNoAssertions )

Test basic board loading - verifies that the Altium import doesn't trigger any assertions during the load process.

This catches regressions in layer mapping and other import issues.

Definition at line 59 of file test_altium_pcb_import.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), and KI_TEST::GetPcbnewTestDataDir().

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( NetclassAssignment )

Test that netclass pattern assignments result in direct netclass assignments on nets.

This is a regression test for https://gitlab.com/kicad/code/kicad/-/issues/15584

Validates that when an Altium board with netclasses is imported, the nets are directly assigned to their netclasses (not just through pattern resolution).

Definition at line 84 of file test_altium_pcb_import.cpp.

References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), NETCLASS::Default, NETCLASS::GetName(), and KI_TEST::GetPcbnewTestDataDir().

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( ScopeExprMatchesPolygon )

Test altiumScopeExprMatchesPolygon utility function.

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/18408

Validates that the scope expression matching correctly identifies polygon-related Altium rule scope expressions used for zone clearance rules.

Definition at line 212 of file test_altium_pcb_import.cpp.

References altiumScopeExprMatchesPolygon().

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( SelectAltiumPolygonRule_PriorityOrder )

Verify selectAltiumPolygonRule honours Altium priority order (1 = highest).

Regression guard for selecting a less-specific polygon rule when multiple polygon-scoped rules exist alongside default (All/All) rules.

Definition at line 244 of file test_altium_pcb_import.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), ARULE6::clearanceGap, ARULE6::priority, ARULE6::scope1expr, ARULE6::scope2expr, and selectAltiumPolygonRule().

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( ZoneClearances_eDP )

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( ZoneClearances_HiFive )

◆ checkAllCopperFillZonesHaveClearance()

static void checkAllCopperFillZonesHaveClearance ( PCB_IO_ALTIUM_DESIGNER & aPlugin,
const std::string & aRelativePath )
static

Verify that copper zones in imported Altium boards have non-zero local clearance values derived from rules whose scope expressions match polygons.

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/18408

Definition at line 158 of file test_altium_pcb_import.cpp.

References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), and PCB_IO_ALTIUM_DESIGNER::LoadBoard().

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().