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" );
 
 
 
  160            m_log->Print( 
"ERROR | " );
 
  167        m_log->Print( aText + 
"\n" );
 
 
 
  196                std::unique_ptr<BOARD>& aBoard );
 
  223                           std::function<
void( 
BOARD& )> aBoardTestFunction,
 
  224                           std::optional<int> aExpectedBoardVersion = std::nullopt );
 
  231                               std::function<
void( 
FOOTPRINT& )> aFootprintTestFunction,
 
  232                               std::optional<int>                aExpectedFootprintVersion );
 
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.
 
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 any messages were reported.
 
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.
 
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 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 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.
 
std::optional< int > m_ExpectedBoardVersion
 
friend std::ostream & operator<<(std::ostream &os, const BOARD_LOAD_TEST_CASE &aTestCase)
 
wxString m_BoardFileRelativePath
 
VECTOR3I expected(15, 30, 45)
 
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.