25#ifndef QA_PCBNEW_BOARD_TEST_UTILS__H
26#define QA_PCBNEW_BOARD_TEST_UTILS__H
104 printf(
"%s", (
const char*) aMessage.c_str() );
111 void Print(
const wxString& aMessage )
116 printf(
"%s", (
const char*) aMessage.c_str() );
125 std::map<COLOR, wxString> colorMap = { {
RED,
"\033[0;31m" },
126 {
GREEN,
"\033[0;32m" },
129 printf(
"%s", (
const char*) colorMap[
color].c_str() );
137 printf(
"\r\033[K" );
179 std::unique_ptr<BOARD>& aBoard );
206 std::function<
void(
BOARD& )> aBoardTestFunction,
207 std::optional<int> aExpectedBoardVersion = std::nullopt );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
A helper that contains logic to assist in dumping boards to disk depending on some environment variab...
void DumpBoardToFile(BOARD &aBoard, const std::string &aName) const
void PrintProgress(const wxString &aMessage)
void SetColor(COLOR color)
bool m_lastLineIsProgressBar
void Print(const wxString &aMessage)
virtual bool HasMessage() const override
Returns true if the reporter client is non-empty.
CONSOLE_MSG_REPORTER(CONSOLE_LOG *log)
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
A pure virtual class used to derive REPORTER objects from.
Represent a set of closed polygons.
Handle a list of polygons defining a copper zone.
void LoadBoard(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< BOARD > &aBoard)
void CheckFootprint(const FOOTPRINT *expected, const FOOTPRINT *fp)
Helper method to check if two footprints are semantically the same.
void FillZones(BOARD *m_board)
void CheckFpShape(const PCB_SHAPE *expected, const PCB_SHAPE *shape)
void CheckFpPad(const PAD *expected, const PAD *pad)
void CheckFpZone(const ZONE *expected, const ZONE *zone)
void CheckFpText(const PCB_TEXT *expected, const PCB_TEXT *text)
void LoadAndTestBoardFile(const wxString aRelativePath, bool aRoundtrip, std::function< void(BOARD &)> aBoardTestFunction, std::optional< int > aExpectedBoardVersion)
Perform "some test" on a board file loaded from the path, then optionally save and reload and run the...
void CheckShapePolySet(const SHAPE_POLY_SET *expected, const SHAPE_POLY_SET *polyset)
BOARD_ITEM & RequireBoardItemWithTypeAndId(const BOARD &aBoard, KICAD_T aItemType, const KIID &aID)
Get an item from the given board with a certain type and UUID.
VECTOR3I expected(15, 30, 45)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.