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

Cross-linking validation for DipTrace board (.dip) imports. More...

#include <pcbnew_utils/board_test_utils.h>
#include <pcbnew_utils/board_file_utils.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcbnew/pcb_io/diptrace/pcb_io_diptrace.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <netinfo.h>
#include <cstring>
#include <fstream>
#include <set>

Go to the source code of this file.

Classes

struct  DIPTRACE_CROSS_LINK_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (SchematicHeaderValid)
 Verify that the paired Z80 Board schematic file (.dch) has a valid DipTrace schematic header.
 
 BOOST_AUTO_TEST_CASE (BoardRefDesPresent)
 Load the Z80 Board PCB and verify that reference designators were imported.
 
 BOOST_AUTO_TEST_CASE (BoardNetsPresent)
 Load the Z80 Board PCB and verify that nets were imported with meaningful names.
 
 BOOST_AUTO_TEST_CASE (PadsParsed)
 Load the Z80 Board PCB and verify that pads were created on footprints.
 

Detailed Description

Cross-linking validation for DipTrace board (.dip) imports.

Loads the Z80 Board project PCB and verifies that the imported board has the reference designators, nets, and pad-net assignments that would be needed for successful cross-linking with the matching schematic.

The companion schematic file (z80_board.dch) is verified to have a valid DipTrace schematic header, confirming the paired test data is present.

Definition in file test_diptrace_cross_link.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( BoardNetsPresent )

Load the Z80 Board PCB and verify that nets were imported with meaningful names.

Named nets indicate that the netlist data from DipTrace was successfully parsed.

Definition at line 153 of file test_diptrace_cross_link.cpp.

References BOOST_REQUIRE().

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( BoardRefDesPresent )

Load the Z80 Board PCB and verify that reference designators were imported.

A board with reference designators is a prerequisite for board-schematic cross-linking.

Definition at line 110 of file test_diptrace_cross_link.cpp.

References BOOST_CHECK_MESSAGE(), and BOOST_REQUIRE().

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( PadsParsed )

Load the Z80 Board PCB and verify that pads were created on footprints.

The Z80 board contains ICs with 14-40 pins as well as discrete 2-pin parts.

Definition at line 183 of file test_diptrace_cross_link.cpp.

References BOOST_REQUIRE().

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( SchematicHeaderValid )

Verify that the paired Z80 Board schematic file (.dch) has a valid DipTrace schematic header.

This confirms the companion test data is present and is a genuine DipTrace schematic file.

Definition at line 95 of file test_diptrace_cross_link.cpp.

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