|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include "pcbnew_utils/board_expectations.h"#include <optional>#include <sstream>#include <core/profile.h>#include <board.h>#include <board_design_settings.h>#include <footprint.h>#include <pad.h>#include <pcbexpr_evaluator.h>#include <pcb_field.h>#include <pcb_group.h>#include <pcb_shape.h>#include <pcb_track.h>#include <project/net_settings.h>#include <zone.h>Go to the source code of this file.
Classes | |
| class | SCALAR_CONSTRAINT |
| A constraint on a scalar value (counts, dimensions, etc.), supporting exact, min, and max bounds. More... | |
| struct | SCALAR_CONSTRAINT::PARSED_SCALAR |
| class | STRING_PATTERN_MATCHER |
| Glob-like pattern matcher for strings, supporting '*' and '? More... | |
| class | NET_EXPECTATION |
| class | NETCLASS_EXPECTATION |
| class | LAYER_EXPECTATION |
| class | ITEM_EVAL_EXPECTATION |
Functions | |
| static std::string | vecToString (std::span< const std::string > aVec) |
| Format a vector of strings for display, e.g. | |
| static void | CheckConstraint (const SCALAR_CONSTRAINT &aConstraint, int aActual) |
| Assert that aActual satisfies aConstraint using Boost.Test macros. | |
| static std::vector< std::string > | getStringArray (const nlohmann::json &aJson) |
| static std::unique_ptr< BOARD_EXPECTATION > | createNetExpectation (const nlohmann::json &aExpectationEntry) |
| static std::unique_ptr< BOARD_EXPECTATION > | createNetClassExpectation (const nlohmann::json &aExpectationEntry) |
| static std::unique_ptr< BOARD_EXPECTATION > | createLayerExpectation (const nlohmann::json &aExpectationEntry) |
| static std::unique_ptr< BOARD_EXPECTATION > | createItemExprExpectation (const nlohmann::json &aExpectationEntry) |
|
static |
Assert that aActual satisfies aConstraint using Boost.Test macros.
Each bound is checked individually so that failures report the specific bound that was violated, with values formatted in the constraint's original units.
Definition at line 283 of file board_expectations.cpp.
References BOOST_TEST(), expected, SCALAR_CONSTRAINT::Format(), SCALAR_CONSTRAINT::GetMax(), SCALAR_CONSTRAINT::GetMin(), and SCALAR_CONSTRAINT::IsExact().
Referenced by NET_EXPECTATION::doSimpleCountTest(), NETCLASS_EXPECTATION::doSimpleCountTest(), ITEM_EVAL_EXPECTATION::RunTest(), LAYER_EXPECTATION::RunTest(), NET_EXPECTATION::RunTest(), and NETCLASS_EXPECTATION::RunTest().
|
static |
Definition at line 1086 of file board_expectations.cpp.
References SCALAR_CONSTRAINT::COUNT, and SCALAR_CONSTRAINT::FromJson().
Referenced by KI_TEST::BOARD_EXPECTATION_TEST::CreateFromJson().
|
static |
Definition at line 1059 of file board_expectations.cpp.
References SCALAR_CONSTRAINT::COUNT, SCALAR_CONSTRAINT::Exact(), SCALAR_CONSTRAINT::FromJson(), and getStringArray().
Referenced by KI_TEST::BOARD_EXPECTATION_TEST::CreateFromJson().
|
static |
Definition at line 1009 of file board_expectations.cpp.
References SCALAR_CONSTRAINT::COUNT, SCALAR_CONSTRAINT::DIMENSION, SCALAR_CONSTRAINT::FromJson(), and getStringArray().
Referenced by KI_TEST::BOARD_EXPECTATION_TEST::CreateFromJson().
|
static |
Definition at line 989 of file board_expectations.cpp.
References SCALAR_CONSTRAINT::COUNT, SCALAR_CONSTRAINT::FromJson(), and getStringArray().
Referenced by KI_TEST::BOARD_EXPECTATION_TEST::CreateFromJson().
|
static |
Definition at line 960 of file board_expectations.cpp.
References result.
Referenced by createLayerExpectation(), createNetClassExpectation(), and createNetExpectation().
|
static |
Format a vector of strings for display, e.g.
["GND", "VCC"]
Definition at line 48 of file board_expectations.cpp.
Referenced by NET_EXPECTATION::GetName(), and NETCLASS_EXPECTATION::GetName().