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

Test suite for import of cadstar *.cpa footprints and board files. More...

Go to the source code of this file.

Classes

struct  CADSTAR_IMPORT_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (CadstarFootprintImport)
 Compare all footprints with their KiCad reference footprint TODO: Refactor this code so it can be made common to all importers!
 
 BOOST_AUTO_TEST_CASE (CadstarRevision7FormatImport)
 Test that CADSTAR Revision 7 format files without ROUTEWIDTH nodes can be imported.
 
 BOOST_AUTO_TEST_CASE (UnknownReassignShapeIsSkipped)
 A PADREASSIGN/VIAREASSIGN whose shape node is unknown (e.g.
 

Detailed Description

Test suite for import of cadstar *.cpa footprints and board files.

Definition in file test_cadstar_footprints.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( CadstarFootprintImport )

Compare all footprints with their KiCad reference footprint TODO: Refactor this code so it can be made common to all importers!

(right now this is copy/paste from EAGLE)

Definition at line 59 of file test_cadstar_footprints.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), KI_TEST::CheckFootprint(), KI_TEST::GetPcbnewTestDataDir(), FOOTPRINT::GetReference(), and FOOTPRINT::GetValue().

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( CadstarRevision7FormatImport )

Test that CADSTAR Revision 7 format files without ROUTEWIDTH nodes can be imported.

This tests the fix for GitLab issue #17783.

Definition at line 112 of file test_cadstar_footprints.cpp.

References BOOST_REQUIRE(), KI_TEST::GetPcbnewTestDataDir(), pcbIUScale, and BOARD::Tracks().

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( UnknownReassignShapeIsSkipped )

A PADREASSIGN/VIAREASSIGN whose shape node is unknown (e.g.

from a newer CADSTAR version) must warn and continue rather than throwing, and must not report a (default-circle) shape so the caller can skip the bogus reassignment instead of corrupting the pad geometry.

Definition at line 158 of file test_cadstar_footprints.cpp.

References XNODE::AddAttribute(), CADSTAR_PCB_ARCHIVE_PARSER::PADREASSIGN::HasShape, CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::HasShape, CADSTAR_PCB_ARCHIVE_PARSER::PADREASSIGN::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::Parse().