|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <boost/test/data/test_case.hpp>#include <wx/wx.h>#include <layer_ids.h>#include <gal/color4d.h>#include <geometry/eda_angle.h>#include <pcbnew/pcbexpr_evaluator.h>#include <drc/drc_rule.h>#include <pcbnew/board.h>#include <board_design_settings.h>#include <pcbnew/pcb_shape.h>#include <pcbnew/pcb_table.h>#include <pcbnew/pcb_track.h>#include <pcbnew/footprint.h>#include <pcbnew/pcb_text.h>#include <pcbnew/zone.h>#include <project/net_settings.h>#include <properties/property.h>#include <properties/property_mgr.h>Go to the source code of this file.
Classes | |
| struct | EXPR_TO_TEST |
Typedefs | |
| using | VAL = LIBEVAL::VALUE |
Functions | |
| static bool | testEvalExpr (const wxString &expr, const LIBEVAL::VALUE &expectedResult, bool expectError=false, BOARD_ITEM *itemA=nullptr, BOARD_ITEM *itemB=nullptr) |
| static void | expectCompileError (const wxString &aExpr) |
| static void | expectCompileSuccess (const wxString &aExpr) |
| BOOST_AUTO_TEST_CASE (IntrospectedProperties) | |
| BOOST_AUTO_TEST_CASE (IntrospectedExtendedNumericProperties) | |
| BOOST_AUTO_TEST_CASE (IntrospectedColorProperties) | |
| BOOST_AUTO_TEST_CASE (ExpressionPropertyTypesAreSupported) | |
| BOOST_AUTO_TEST_CASE (IntrospectedPropertyAvailability) | |
| BOOST_AUTO_TEST_CASE (InNetChainClassWildcard) | |
| BOOST_AUTO_TEST_CASE (ParentNavigation) | |
| BOOST_AUTO_TEST_CASE (ReceiverValidation) | |
| BOOST_AUTO_TEST_CASE (PairItemDependency) | |
Variables | |
| static const std::vector< EXPR_TO_TEST > | simpleExpressions |
| static const std::vector< EXPR_TO_TEST > | introspectionExpressions |
| using VAL = LIBEVAL::VALUE |
Definition at line 57 of file test_libeval_compiler.cpp.
| BOOST_AUTO_TEST_CASE | ( | ExpressionPropertyTypesAreSupported | ) |
Definition at line 280 of file test_libeval_compiler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PCBEXPR_VAR_REF::ClassifyProperty(), expectCompileError(), PCBEXPR_VAR_REF::ExpressionType(), PROPERTY_MANAGER::GetAllClasses(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::IsOfType(), PROPERTY_BASE::Name(), PROPERTY_MANAGER::Rebuild(), TYPE_HASH, PROPERTY_BASE::TypeHash(), and UNSUPPORTED.
| BOOST_AUTO_TEST_CASE | ( | InNetChainClassWildcard | ) |
Definition at line 345 of file test_libeval_compiler.cpp.
References BOARD::GetDesignSettings(), PROPERTY_MANAGER::Instance(), BOARD_DESIGN_SETTINGS::m_NetSettings, PROPERTY_MANAGER::Rebuild(), BOARD_CONNECTED_ITEM::SetNet(), and testEvalExpr().
| BOOST_AUTO_TEST_CASE | ( | IntrospectedColorProperties | ) |
Definition at line 259 of file test_libeval_compiler.cpp.
References BOOST_CHECK_EQUAL(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::Rebuild(), table, testEvalExpr(), and KIGFX::COLOR4D::ToCSSString().
| BOOST_AUTO_TEST_CASE | ( | IntrospectedExtendedNumericProperties | ) |
Definition at line 225 of file test_libeval_compiler.cpp.
References DEGREES_T, ELLIPSE, F_Cu, PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::Rebuild(), ZONE::SetAssignedPriority(), PCB_SHAPE::SetEllipseRotation(), ZONE::SetHatchOrientation(), ZONE::SetLayer(), FOOTPRINT::SetLocalSolderPasteMarginRatio(), ZONE::SetMinIslandArea(), and testEvalExpr().
| BOOST_AUTO_TEST_CASE | ( | IntrospectedProperties | ) |
Definition at line 190 of file test_libeval_compiler.cpp.
References F_Cu, BOARD::GetNetInfo(), PROPERTY_MANAGER::Instance(), introspectionExpressions, pcbIUScale, PROPERTY_MANAGER::Rebuild(), BOARD_CONNECTED_ITEM::SetLayer(), BOARD_CONNECTED_ITEM::SetNet(), PCB_TRACK::SetWidth(), and testEvalExpr().
| BOOST_AUTO_TEST_CASE | ( | IntrospectedPropertyAvailability | ) |
Definition at line 326 of file test_libeval_compiler.cpp.
References F_Cu, PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::Rebuild(), ZONE::SetAssignedPriority(), ZONE::SetIsRuleArea(), ZONE::SetLayer(), and testEvalExpr().
| BOOST_AUTO_TEST_CASE | ( | PairItemDependency | ) |
Definition at line 451 of file test_libeval_compiler.cpp.
References BOOST_REQUIRE(), LIBEVAL::COMPILER::Compile(), NULL_CONSTRAINT, PCBEXPR_UCODE::RequiresPairItems(), and UNDEFINED_LAYER.
| BOOST_AUTO_TEST_CASE | ( | ParentNavigation | ) |
Definition at line 392 of file test_libeval_compiler.cpp.
References FOOTPRINT::Add(), expectCompileError(), PROPERTY_MANAGER::Instance(), PROPERTY_MANAGER::Rebuild(), FOOTPRINT::SetReference(), testEvalExpr(), and text.
| BOOST_AUTO_TEST_CASE | ( | ReceiverValidation | ) |
Definition at line 438 of file test_libeval_compiler.cpp.
References expectCompileError(), and expectCompileSuccess().
|
static |
Definition at line 160 of file test_libeval_compiler.cpp.
References LIBEVAL::COMPILER::Compile(), LIBEVAL::COMPILER::IsErrorPending(), NULL_CONSTRAINT, and UNDEFINED_LAYER.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 172 of file test_libeval_compiler.cpp.
References LIBEVAL::COMPILER::Compile(), LIBEVAL::COMPILER::IsErrorPending(), NULL_CONSTRAINT, and UNDEFINED_LAYER.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 109 of file test_libeval_compiler.cpp.
References LIBEVAL::VALUE::AsDouble(), LIBEVAL::VALUE::AsString(), BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), LIBEVAL::COMPILER::Compile(), LIBEVAL::COMPILER::GetError(), LIBEVAL::VALUE::GetType(), LIBEVAL::ERROR_STATUS::message, NULL_CONSTRAINT, result, LIBEVAL::UCODE::Run(), PCBEXPR_CONTEXT::SetItems(), LIBEVAL::ERROR_STATUS::srcPos, UNDEFINED_LAYER, and LIBEVAL::VT_NUMERIC.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 93 of file test_libeval_compiler.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 59 of file test_libeval_compiler.cpp.