|
KiCad PCB EDA Suite
|
Custom REPORTER that captures all messages for later analysis in the unit test framework. More...
#include <board_test_utils.h>
Classes | |
| struct | MESSAGE |
Public Types | |
| enum | LOCATION { LOC_HEAD = 0 , LOC_BODY , LOC_TAIL } |
| Location where the message is to be reported. More... | |
Public Member Functions | |
| CAPTURING_REPORTER () | |
| REPORTER & | Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override |
| Report a string with a given severity. | |
| bool | HasMessage () const override |
| Returns true if any messages were reported. | |
| EDA_UNITS | GetUnits () const override |
| void | Clear () override |
| void | PrintAllMessages (const std::string &aContext) const |
| int | GetErrorCount () const |
| int | GetWarningCount () const |
| const std::vector< MESSAGE > & | GetMessages () const |
| REPORTER & | Report (const char *aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) |
| virtual REPORTER & | ReportTail (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) |
| Places the report at the end of the list, for objects that support report ordering. | |
| virtual REPORTER & | ReportHead (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) |
| Places the report at the beginning of the list for objects that support ordering. | |
| REPORTER & | operator<< (const wxString &aText) |
| virtual bool | HasMessageOfSeverity (int aSeverityMask) const |
| Returns true if the reporter has one or more messages matching the specified severity mask. | |
Private Attributes | |
| std::vector< MESSAGE > | m_messages |
| int | m_errorCount |
| int | m_warningCount |
| int | m_infoCount |
| int | m_reportedSeverityMask |
Custom REPORTER that captures all messages for later analysis in the unit test framework.
Definition at line 262 of file board_test_utils.h.
|
inherited |
Location where the message is to be reported.
LOC_HEAD messages are printed before all others (typically intro messages) LOC_BODY messages are printed in the middle LOC_TAIL messages are printed after all others (typically status messages)
| Enumerator | |
|---|---|
| LOC_HEAD | |
| LOC_BODY | |
| LOC_TAIL | |
Definition at line 88 of file reporter.h.
|
inline |
Definition at line 271 of file board_test_utils.h.
References m_errorCount, m_infoCount, and m_warningCount.
|
inlineoverridevirtual |
Reimplemented from REPORTER.
Definition at line 284 of file board_test_utils.h.
References m_errorCount, m_infoCount, m_messages, and m_warningCount.
|
inline |
Definition at line 294 of file board_test_utils.h.
References m_errorCount.
Referenced by BOOST_AUTO_TEST_CASE(), and RunBoardLoad().
|
inline |
Definition at line 296 of file board_test_utils.h.
References m_messages.
Referenced by RunBoardLoad().
|
inlineoverridevirtual |
|
inline |
Definition at line 295 of file board_test_utils.h.
References m_warningCount.
Referenced by RunBoardLoad().
|
inlineoverridevirtual |
Returns true if any messages were reported.
Reimplemented from REPORTER.
Definition at line 280 of file board_test_utils.h.
References m_messages.
|
inlinevirtualinherited |
Returns true if the reporter has one or more messages matching the specified severity mask.
Reimplemented in WX_HTML_PANEL_REPORTER.
Definition at line 143 of file reporter.h.
References m_reportedSeverityMask.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), COMPONENT_CLASS_MANAGER::CompileAssignmentRule(), DRC_ENGINE::compileRules(), DIALOG_SIM_MODEL< T >::loadLibrary(), SIMULATOR_CONTROL::NewAnalysisTab(), DRC_RE_CUSTOM_RULE_PANEL::onCheckSyntax(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), SIM_LIB_MGR::SetLibrary(), and SIMULATOR_FRAME::showNetlistErrors().
|
inlineinherited |
Definition at line 129 of file reporter.h.
References Report(), and REPORTER().
| void KI_TEST::CAPTURING_REPORTER::PrintAllMessages | ( | const std::string & | aContext | ) | const |
Definition at line 814 of file board_test_utils.cpp.
References BOOST_TEST_MESSAGE(), m_errorCount, m_messages, m_warningCount, RPT_SEVERITY_ACTION, RPT_SEVERITY_DEBUG, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
Referenced by BOOST_AUTO_TEST_CASE().
|
overridevirtual |
Report a string with a given severity.
| aText | is the string to report. |
| aSeverity | is an indicator ( RPT_UNDEFINED, RPT_INFO, RPT_WARNING, RPT_ERROR, RPT_ACTION ) used to filter and format messages |
Reimplemented from REPORTER.
Definition at line 794 of file board_test_utils.cpp.
References m_errorCount, m_infoCount, m_messages, m_warningCount, REPORTER::REPORTER(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, RPT_SEVERITY_WARNING, KI_TEST::CAPTURING_REPORTER::MESSAGE::severity, and KI_TEST::CAPTURING_REPORTER::MESSAGE::text.
|
inherited |
Definition at line 50 of file reporter.cpp.
References From_UTF8(), Report(), and REPORTER().
|
inlinevirtualinherited |
Places the report at the beginning of the list for objects that support ordering.
Reimplemented in WX_HTML_PANEL_REPORTER.
Definition at line 121 of file reporter.h.
References Report(), REPORTER(), and RPT_SEVERITY_UNDEFINED.
Referenced by BACK_ANNOTATE::applyChangelist(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DIALOG_IMPORT_NETLIST::loadNetlist(), DIALOG_EXPORT_NETLIST::TransferDataFromWindow(), and SCH_EDIT_FRAME::WriteNetListFile().
|
inlinevirtualinherited |
Places the report at the end of the list, for objects that support report ordering.
Reimplemented in WX_HTML_PANEL_REPORTER.
Definition at line 112 of file reporter.h.
References Report(), REPORTER(), and RPT_SEVERITY_UNDEFINED.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EXCELLON_WRITER::CreateDrillandMapFilesSet(), GERBER_WRITER::CreateDrillandMapFilesSet(), SCH_PLOTTER::createDXFFiles(), SCH_PLOTTER::createPDFFile(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_PLOTTER::createPSFiles(), SCH_PLOTTER::createSVGFiles(), SCH_SCREEN::UpdateSymbolLinks(), and SCH_EDIT_FRAME::WriteNetListFile().
|
private |
Definition at line 300 of file board_test_utils.h.
Referenced by CAPTURING_REPORTER(), Clear(), GetErrorCount(), PrintAllMessages(), and Report().
|
private |
Definition at line 302 of file board_test_utils.h.
Referenced by CAPTURING_REPORTER(), Clear(), and Report().
|
private |
Definition at line 299 of file board_test_utils.h.
Referenced by Clear(), GetMessages(), HasMessage(), PrintAllMessages(), and Report().
|
privateinherited |
Definition at line 159 of file reporter.h.
Referenced by Clear(), HasMessage(), HasMessageOfSeverity(), Report(), and REPORTER().
|
private |
Definition at line 301 of file board_test_utils.h.
Referenced by CAPTURING_REPORTER(), Clear(), GetWarningCount(), PrintAllMessages(), and Report().