KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>
#include <reporter.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/statusbr.h>
#include <wx/log.h>
#include <vector>
#include <sstream>
Go to the source code of this file.
Classes | |
class | TEST_REPORTER |
class | MockTextCtrl |
class | MockStatusBar |
Functions | |
BOOST_AUTO_TEST_CASE (BaseReporter_Constructor) | |
BOOST_AUTO_TEST_CASE (BaseReporter_SingleReport) | |
BOOST_AUTO_TEST_CASE (BaseReporter_MultipleReports) | |
BOOST_AUTO_TEST_CASE (BaseReporter_ReportTail) | |
BOOST_AUTO_TEST_CASE (BaseReporter_ReportHead) | |
BOOST_AUTO_TEST_CASE (BaseReporter_OperatorLeftShift) | |
BOOST_AUTO_TEST_CASE (BaseReporter_CharPointerReport) | |
BOOST_AUTO_TEST_CASE (BaseReporter_Clear) | |
BOOST_AUTO_TEST_CASE (BaseReporter_SeverityMask) | |
BOOST_AUTO_TEST_CASE (BaseReporter_EmptyMessage) | |
BOOST_AUTO_TEST_CASE (BaseReporter_LongMessage) | |
BOOST_AUTO_TEST_CASE (WxStringReporter_BasicFunctionality) | |
BOOST_AUTO_TEST_CASE (WxStringReporter_MultipleMessages) | |
BOOST_AUTO_TEST_CASE (WxStringReporter_Clear) | |
BOOST_AUTO_TEST_CASE (WxStringReporter_SeverityMask) | |
BOOST_AUTO_TEST_CASE (WxStringReporter_OperatorChaining) | |
BOOST_AUTO_TEST_CASE (NullReporter_Singleton) | |
BOOST_AUTO_TEST_CASE (NullReporter_NoMessages) | |
BOOST_AUTO_TEST_CASE (NullReporter_SeverityMask) | |
BOOST_AUTO_TEST_CASE (CliReporter_Singleton) | |
BOOST_AUTO_TEST_CASE (CliReporter_NoMessages) | |
BOOST_AUTO_TEST_CASE (StdoutReporter_Singleton) | |
BOOST_AUTO_TEST_CASE (StdoutReporter_NoMessages) | |
BOOST_AUTO_TEST_CASE (WxLogReporter_Singleton) | |
BOOST_AUTO_TEST_CASE (WxLogReporter_NoMessages) | |
BOOST_AUTO_TEST_CASE (ReporterInterface_Polymorphism) | |
BOOST_AUTO_TEST_CASE (ReporterInterface_ChainedOperations) | |
BOOST_AUTO_TEST_CASE (ReporterInterface_DefaultSeverity) | |
BOOST_AUTO_TEST_CASE (ReporterInterface_UnitsDefault) | |
BOOST_AUTO_TEST_CASE | ( | BaseReporter_CharPointerReport | ) |
Definition at line 188 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::HasMessage(), REPORTER::HasMessageOfSeverity(), TEST_REPORTER::Report(), and RPT_SEVERITY_ERROR.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_Clear | ) |
Definition at line 199 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::Clear(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::HasMessage(), REPORTER::HasMessageOfSeverity(), TEST_REPORTER::Report(), RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_Constructor | ) |
Definition at line 104 of file test_reporting.cpp.
References REPORTER::GetUnits(), TEST_REPORTER::HasMessage(), REPORTER::HasMessageOfSeverity(), MM, and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_EmptyMessage | ) |
Definition at line 237 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::GetMessages(), TEST_REPORTER::HasMessage(), TEST_REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_LongMessage | ) |
Definition at line 250 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::GetMessages(), TEST_REPORTER::HasMessage(), TEST_REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_MultipleReports | ) |
Definition at line 129 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::HasMessage(), REPORTER::HasMessageOfSeverity(), TEST_REPORTER::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_OperatorLeftShift | ) |
Definition at line 174 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::GetMessages(), TEST_REPORTER::HasMessage(), and RPT_SEVERITY_UNDEFINED.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_ReportHead | ) |
Definition at line 160 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::GetMessages(), TEST_REPORTER::HasMessage(), REPORTER::ReportHead(), and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_ReportTail | ) |
Definition at line 146 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::GetMessages(), TEST_REPORTER::HasMessage(), REPORTER::ReportTail(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_SeverityMask | ) |
Definition at line 218 of file test_reporting.cpp.
References REPORTER::HasMessageOfSeverity(), TEST_REPORTER::Report(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | BaseReporter_SingleReport | ) |
Definition at line 113 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessageCount(), TEST_REPORTER::GetMessages(), TEST_REPORTER::HasMessage(), REPORTER::HasMessageOfSeverity(), TEST_REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | CliReporter_NoMessages | ) |
Definition at line 371 of file test_reporting.cpp.
References CLI_REPORTER::GetInstance(), REPORTER::HasMessage(), REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | CliReporter_Singleton | ) |
Definition at line 363 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), and CLI_REPORTER::GetInstance().
BOOST_AUTO_TEST_CASE | ( | NullReporter_NoMessages | ) |
Definition at line 340 of file test_reporting.cpp.
References NULL_REPORTER::GetInstance(), REPORTER::HasMessage(), REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | NullReporter_SeverityMask | ) |
Definition at line 351 of file test_reporting.cpp.
References NULL_REPORTER::GetInstance(), REPORTER::HasMessageOfSeverity(), REPORTER::Report(), RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | NullReporter_Singleton | ) |
Definition at line 332 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), and NULL_REPORTER::GetInstance().
BOOST_AUTO_TEST_CASE | ( | ReporterInterface_ChainedOperations | ) |
Definition at line 442 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), WX_STRING_REPORTER::GetMessages(), WX_STRING_REPORTER::HasMessage(), WX_STRING_REPORTER::Report(), REPORTER::ReportHead(), REPORTER::ReportTail(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | ReporterInterface_DefaultSeverity | ) |
Definition at line 460 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), TEST_REPORTER::GetMessages(), TEST_REPORTER::Report(), and RPT_SEVERITY_UNDEFINED.
BOOST_AUTO_TEST_CASE | ( | ReporterInterface_Polymorphism | ) |
Definition at line 423 of file test_reporting.cpp.
References RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | ReporterInterface_UnitsDefault | ) |
Definition at line 471 of file test_reporting.cpp.
References REPORTER::GetUnits(), and MM.
BOOST_AUTO_TEST_CASE | ( | StdoutReporter_NoMessages | ) |
Definition at line 390 of file test_reporting.cpp.
References STDOUT_REPORTER::GetInstance(), REPORTER::HasMessage(), REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | StdoutReporter_Singleton | ) |
Definition at line 382 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), and STDOUT_REPORTER::GetInstance().
BOOST_AUTO_TEST_CASE | ( | WxLogReporter_NoMessages | ) |
Definition at line 409 of file test_reporting.cpp.
References WXLOG_REPORTER::GetInstance(), REPORTER::HasMessage(), REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | WxLogReporter_Singleton | ) |
Definition at line 401 of file test_reporting.cpp.
References BOOST_CHECK_EQUAL(), and WXLOG_REPORTER::GetInstance().
BOOST_AUTO_TEST_CASE | ( | WxStringReporter_BasicFunctionality | ) |
Definition at line 264 of file test_reporting.cpp.
References WX_STRING_REPORTER::GetMessages(), WX_STRING_REPORTER::HasMessage(), WX_STRING_REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | WxStringReporter_Clear | ) |
Definition at line 291 of file test_reporting.cpp.
References WX_STRING_REPORTER::Clear(), WX_STRING_REPORTER::GetMessages(), WX_STRING_REPORTER::HasMessage(), WX_STRING_REPORTER::Report(), and RPT_SEVERITY_INFO.
BOOST_AUTO_TEST_CASE | ( | WxStringReporter_MultipleMessages | ) |
Definition at line 277 of file test_reporting.cpp.
References WX_STRING_REPORTER::GetMessages(), WX_STRING_REPORTER::HasMessage(), WX_STRING_REPORTER::Report(), RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | WxStringReporter_OperatorChaining | ) |
Definition at line 317 of file test_reporting.cpp.
References WX_STRING_REPORTER::GetMessages(), WX_STRING_REPORTER::HasMessage(), REPORTER::Report(), WX_STRING_REPORTER::Report(), RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.
BOOST_AUTO_TEST_CASE | ( | WxStringReporter_SeverityMask | ) |
Definition at line 304 of file test_reporting.cpp.
References REPORTER::HasMessageOfSeverity(), WX_STRING_REPORTER::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, and RPT_SEVERITY_WARNING.