KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_odb_dimension_export.cpp File Reference
#include <filesystem>
#include <fstream>
#include <memory>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/unit_test.hpp>
#include <base_units.h>
#include <board.h>
#include <kiid.h>
#include <pcb_dimension.h>
#include <pcb_shape.h>
#include <pcbnew/pcb_io/odbpp/pcb_io_odbpp.h>
#include <settings/settings_manager.h>
#include <core/utf8.h>

Go to the source code of this file.

Functions

static int countOdbLineRecords (const fs::path &aFeaturesFile)
 Count line ("L ") feature records in a single ODB++ "features" file.
 
static fs::path findSilkFeaturesFile (const fs::path &aRoot)
 Locate the silkscreen layer "features" file in an ODB++ export tree.
 
 BOOST_AUTO_TEST_CASE (OdbDimensionExport)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

◆ countOdbLineRecords()

static int countOdbLineRecords ( const fs::path & aFeaturesFile)
static

Count line ("L ") feature records in a single ODB++ "features" file.

A dimension's extension lines, crossbar and arrowheads are emitted as line records, so a non-zero count in the silkscreen layer proves the dimension reached the feature stream (regression guard for GitLab #20249, where the PCB_DIM_*_T cases were stubbed out of the ODB++ feature generator).

Definition at line 50 of file test_odb_dimension_export.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ findSilkFeaturesFile()

static fs::path findSilkFeaturesFile ( const fs::path & aRoot)
static

Locate the silkscreen layer "features" file in an ODB++ export tree.

The layer directory name is derived from the board layer name, so it is matched by substring ("silk") rather than a hard-coded path to stay robust against ODB++ naming changes.

Definition at line 72 of file test_odb_dimension_export.cpp.

Referenced by BOOST_AUTO_TEST_CASE().