KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>
#include <turtle/mock.hpp>
#include <qa_utils/wx_utils/wx_assert.h>
#include <functional>
#include <set>
#include <wx/gdicmn.h>
Go to the source code of this file.
Classes | |
struct | BOOST_TEST_PRINT_NAMESPACE_OPEN::print_log_value< std::nullptr_t > |
struct | BOOST_TEST_PRINT_NAMESPACE_OPEN::print_log_value< std::vector< T > > |
Boost print helper for generic vectors. More... | |
struct | BOOST_TEST_PRINT_NAMESPACE_OPEN::print_log_value< wxPoint > |
Boost print helper for wxPoint. More... | |
Namespaces | |
namespace | BOOST_TEST_PRINT_NAMESPACE_OPEN |
Before Boost 1.64, nullptr_t wasn't handled. | |
namespace | KI_TEST |
Macros | |
#define | BOOST_NO_AUTO_PTR |
#define | BOOST_TEST_INFO(A) BOOST_TEST_MESSAGE( A ) |
If HAVE_EXPECTED_FAILURES is defined, this means that boost::unit_test::expected_failures is available. More... | |
#define | BOOST_TEST_CONTEXT(A) BOOST_TEST_MESSAGE( A ); |
#define | BOOST_TEST_PRINT_NAMESPACE_OPEN |
#define | BOOST_TEST_PRINT_NAMESPACE_CLOSE } |
#define | CHECK_WX_ASSERT(STATEMENT) |
A test macro to check a wxASSERT is thrown. More... | |
Typedefs | |
template<typename EXP_CONT > | |
using | KI_TEST::EXP_OBJ = typename EXP_CONT::value_type |
template<typename FOUND_CONT > | |
using | KI_TEST::FOUND_OBJ = typename FOUND_CONT::value_type |
template<typename EXP_OBJ , typename FOUND_OBJ > | |
using | KI_TEST::MATCH_PRED = std::function< bool(const EXP_OBJ &, const FOUND_OBJ &)> |
A match predicate: check that a "found" object is equivalent to or represents an "expected" object, perhaps of a different type. More... | |
Functions | |
template<typename EXP_CONT , typename FOUND_CONT , typename MATCH_PRED > | |
void | KI_TEST::CheckUnorderedMatches (const EXP_CONT &aExpected, const FOUND_CONT &aFound, MATCH_PRED aMatchPredicate) |
Check that a container of "found" objects matches a container of "expected" objects. More... | |
template<typename T > | |
bool | KI_TEST::CollectionHasNoDuplicates (const T &aCollection) |
Predicate to check a collection has no duplicate elements. More... | |
#define BOOST_NO_AUTO_PTR |
Definition at line 27 of file unit_test_utils.h.
Definition at line 82 of file unit_test_utils.h.
If HAVE_EXPECTED_FAILURES is defined, this means that boost::unit_test::expected_failures is available.
Wrap expected-to-fail tests with this to prevent them being compiled on platforms with older (<1.59) Boost versions.
This can be removed when our minimum boost version is 1.59 or higher. BOOST_TEST, while extremely handy, is not available in Boost < 1.59. Undef it here to prevent use. Using it can cause older packaging like Ubuntu LTS (which is on Boost 1.58) to fail.
Use BOOST_CHECK_{EQUAL,NE,etc} instead.
This can be removed when our minimum boost version is 1.59 or higher.
Definition at line 72 of file unit_test_utils.h.
#define BOOST_TEST_PRINT_NAMESPACE_CLOSE } |
Definition at line 112 of file unit_test_utils.h.
#define BOOST_TEST_PRINT_NAMESPACE_OPEN |
Definition at line 108 of file unit_test_utils.h.
#define CHECK_WX_ASSERT | ( | STATEMENT | ) |
A test macro to check a wxASSERT is thrown.
This only happens in DEBUG builds, so prevent test failures in Release builds by using this macro.
Definition at line 299 of file unit_test_utils.h.