KiCad PCB EDA Suite
|
#include <pcbnew_utils/board_test_utils.h>
#include <iostream>
#include <filesystem>
#include <wx/filename.h>
#include <boost/test/unit_test.hpp>
#include <board.h>
#include <board_commit.h>
#include <board_design_settings.h>
#include <footprint.h>
#include <kiid.h>
#include <pad.h>
#include <pcb_shape.h>
#include <zone.h>
#include <zone_filler.h>
#include <length_delay_calculation/length_delay_calculation.h>
#include <drc/drc_cache_generator.h>
#include <pcbnew_utils/board_file_utils.h>
#include <settings/settings_manager.h>
#include <tool/tool_manager.h>
Go to the source code of this file.
Classes | |
class | KI_TEST::TEMPORARY_DIRECTORY |
A temporary directory that will be deleted when it goes out of scope. More... | |
struct | KI_TEST::kitest_cmp_drawings |
Namespaces | |
namespace | KI_TEST |
Macros | |
#define | CHECK_ENUM_CLASS_EQUAL(L, R) |
#define | TEST(a, b) |
#define | TEST_PT(a, b) |
Functions | |
void | KI_TEST::LoadBoard (SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard) |
BOARD_ITEM & | KI_TEST::RequireBoardItemWithTypeAndId (const BOARD &aBoard, KICAD_T aItemType, const KIID &aID) |
Get an item from the given board with a certain type and UUID. | |
void | KI_TEST::LoadAndTestBoardFile (const wxString aRelativePath, bool aRoundtrip, std::function< void(BOARD &)> aBoardTestFunction, std::optional< int > aExpectedBoardVersion=std::nullopt) |
Perform "some test" on a board file loaded from the path, then optionally save and reload and run the test again. | |
void | KI_TEST::LoadAndTestFootprintFile (const wxString &aLibRelativePath, const wxString &aFpName, bool aRoundtrip, std::function< void(FOOTPRINT &)> aFootprintTestFunction, std::optional< int > aExpectedFootprintVersion) |
Same as LoadAndTestBoardFile, but for footprints. | |
void | KI_TEST::FillZones (BOARD *m_board) |
void | KI_TEST::CheckFootprint (const FOOTPRINT *expected, const FOOTPRINT *fp) |
Helper method to check if two footprints are semantically the same. | |
void | KI_TEST::CheckFpPad (const PAD *expected, const PAD *pad) |
void | KI_TEST::CheckFpText (const PCB_TEXT *expected, const PCB_TEXT *text) |
void | KI_TEST::CheckFpShape (const PCB_SHAPE *expected, const PCB_SHAPE *shape) |
void | KI_TEST::CheckFpZone (const ZONE *expected, const ZONE *zone) |
void | KI_TEST::CheckShapePolySet (const SHAPE_POLY_SET *expected, const SHAPE_POLY_SET *polyset) |
#define CHECK_ENUM_CLASS_EQUAL | ( | L, | |
R ) |
Definition at line 48 of file board_test_utils.cpp.
Referenced by KI_TEST::CheckFootprint(), KI_TEST::CheckFpPad(), KI_TEST::CheckFpShape(), KI_TEST::CheckFpText(), and KI_TEST::CheckFpZone().
#define TEST | ( | a, | |
b ) |
Definition at line 361 of file board_test_utils.cpp.
#define TEST_PT | ( | a, | |
b ) |
Definition at line 366 of file board_test_utils.cpp.