KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_footprint_load_save.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/data/test_case.hpp>
#include <qa_utils/file_utils.h>
#include <board.h>
#include <kiid.h>
#include <footprint.h>
#include <board_design_settings.h>
#include <pcb_field.h>
#include <pcb_text.h>
#include <pcbnew_utils/board_file_utils.h>
#include <pcbnew_utils/board_test_utils.h>
#include <settings/settings_manager.h>
#include <filesystem>

Go to the source code of this file.

Functions

 BOOST_DATA_TEST_CASE (FootprintLoadSave, boost::unit_test::data::make(FootprintLoadSave_testCases), testCase)
 Simple tests cases that load a board file and check expected properties of the footprints.
 
 BOOST_AUTO_TEST_CASE (FootprintFieldLockRoundTrip)
 Fields are written without a header of their own, inside the footprint's (property ...), so their lock takes a different path through the writer than a plain footprint text's does.
 
 BOOST_AUTO_TEST_CASE (FootprintUserFieldKeepsAutoThickness)
 A field with no thickness token is using auto thickness.
 
 BOOST_AUTO_TEST_CASE (LegacyFootprintPropertyTakesBoardDefaults)
 The other side of the same call: a legacy property carries no effects at all, so the board defaults are the only style it can get.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( FootprintFieldLockRoundTrip )

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( FootprintUserFieldKeepsAutoThickness )

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( LegacyFootprintPropertyTakesBoardDefaults )

The other side of the same call: a legacy property carries no effects at all, so the board defaults are the only style it can get.

Definition at line 201 of file test_footprint_load_save.cpp.

References BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), EDA_TEXT::GetAutoThickness(), BOARD_ITEM::GetLayer(), PCB_TEXT::GetTextThickness(), and KI_TEST::LoadAndTestBoardFile().

◆ BOOST_DATA_TEST_CASE()

BOOST_DATA_TEST_CASE ( FootprintLoadSave ,
boost::unit_test::data::make(FootprintLoadSave_testCases) ,
testCase  )

Simple tests cases that load a board file and check expected properties of the footprints.

This is not the same as FpLibLoadSave as it loads board files, and not footprint files from a library.

Definition at line 85 of file test_footprint_load_save.cpp.

References KIID::AsString(), BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), KI_TEST::LoadAndTestBoardFile(), PCB_FOOTPRINT_T, and KI_TEST::RequireBoardItemWithTypeAndId().