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

Cross-validate Allegro via and through-hole-pad import against the fabrication Excellon drill files (.drl), whose filenames encode the layer span (e.g. More...

#include "allegro_test_utils.h"
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <board.h>
#include <board_design_settings.h>
#include <footprint.h>
#include <lset.h>
#include <pad.h>
#include <pcb_track.h>
#include <algorithm>
#include <cmath>
#include <filesystem>
#include <fstream>
#include <map>
#include <regex>
#include <set>
#include <string>
#include <tuple>
#include <vector>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (GroundTruthAndBoardLoad)
 The fixture and its ground truth must be well-formed before the cross-validation tests have any meaning.
 
 BOOST_AUTO_TEST_CASE (BlindAndBuriedViasPresent)
 The board has exactly six via spans, five of them blind/buried.
 
 BOOST_AUTO_TEST_CASE (DrillSpansMatchExcellon)
 Every (span, drill-diameter) pair in the drill files must appear in the imported board and vice versa, so each diameter both survives the padstack parse and lands on the right layer span.
 

Detailed Description

Cross-validate Allegro via and through-hole-pad import against the fabrication Excellon drill files (.drl), whose filenames encode the layer span (e.g.

"...-3-6.drl" spans layers 3 to 6). Verifies that blind, buried, and through vias are classified onto the right layers instead of being flattened to through holes.

Definition in file test_allegro_drill_spans.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( BlindAndBuriedViasPresent )

The board has exactly six via spans, five of them blind/buried.

Guards against the old importer which hardcoded every via to a through hole.

Definition at line 293 of file test_allegro_drill_spans.cpp.

References BLIND, BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), BURIED, MICROVIA, PCB_VIA_T, THROUGH, and via.

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( DrillSpansMatchExcellon )

Every (span, drill-diameter) pair in the drill files must appear in the imported board and vice versa, so each diameter both survives the padstack parse and lands on the right layer span.

Definition at line 341 of file test_allegro_drill_spans.cpp.

References std::abs(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), and BOOST_TEST_MESSAGE().

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( GroundTruthAndBoardLoad )

The fixture and its ground truth must be well-formed before the cross-validation tests have any meaning.

This guards against a missing board file or a drill-file parse error silently turning the real assertions into no-ops.

Definition at line 275 of file test_allegro_drill_spans.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), and BOOST_TEST_MESSAGE().