KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_libeval_compiler.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcbnew_utils/board_construction_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 <drc/drc_rule_condition.h>
#include <drc/drc_rule_parser.h>
#include <ki_exception.h>
#include <reporter.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/pad.h>
#include <pcbnew/pcb_text.h>
#include <pcbnew/zone.h>
#include <project/net_settings.h>
#include <properties/property.h>
#include <properties/property_mgr.h>
#include <dialogs/dialog_find_by_properties.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, BOARD_ITEM *itemA, BOARD_ITEM *itemB, bool expectError=false)
 
static void expectCompileError (const wxString &aExpr)
 
static void expectCompileSuccess (const wxString &aExpr)
 
 BOOST_AUTO_TEST_CASE (SimpleExpressions)
 
 BOOST_AUTO_TEST_CASE (IntrospectedProperties)
 
 BOOST_AUTO_TEST_CASE (IntrospectedExtendedNumericProperties)
 
 BOOST_AUTO_TEST_CASE (UnitlessStringProperties)
 
 BOOST_AUTO_TEST_CASE (RenamedProperties)
 
 BOOST_AUTO_TEST_CASE (IntrospectedColorProperties)
 
 BOOST_AUTO_TEST_CASE (ExpressionPropertyTypesAreSupported)
 
 BOOST_AUTO_TEST_CASE (IntrospectedPropertyAvailability)
 
 BOOST_AUTO_TEST_CASE (InNetChainClassWildcard)
 
 BOOST_AUTO_TEST_CASE (StackedMicroviaExpression)
 
 BOOST_AUTO_TEST_CASE (ParentNavigation)
 
 BOOST_AUTO_TEST_CASE (PropertyParentFallback)
 
 BOOST_AUTO_TEST_CASE (BoolPropertyEvaluation)
 
 BOOST_AUTO_TEST_CASE (VariantAwareEvaluation)
 
 BOOST_AUTO_TEST_CASE (FieldAliasNormalization)
 
 BOOST_AUTO_TEST_CASE (ReceiverValidation)
 
 BOOST_AUTO_TEST_CASE (LayerReceiverLayerField)
 
 BOOST_AUTO_TEST_CASE (DynamicCourtyardArgument)
 
 BOOST_AUTO_TEST_CASE (FunctionArgumentValidation)
 
 BOOST_AUTO_TEST_CASE (ExpressionStackCapacity)
 
 BOOST_AUTO_TEST_CASE (ExpressionStackOverflow)
 
 BOOST_AUTO_TEST_CASE (MalformedConditionSwappedItemRetry)
 
 BOOST_AUTO_TEST_CASE (SingleItemRulePreflight)
 
 BOOST_AUTO_TEST_CASE (PairConditionsInSingleItemRules)
 
 BOOST_AUTO_TEST_CASE (PairItemDependency)
 

Typedef Documentation

◆ VAL

Definition at line 66 of file test_libeval_compiler.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/25]

BOOST_AUTO_TEST_CASE ( BoolPropertyEvaluation )

◆ BOOST_AUTO_TEST_CASE() [2/25]

◆ BOOST_AUTO_TEST_CASE() [3/25]

◆ BOOST_AUTO_TEST_CASE() [4/25]

◆ BOOST_AUTO_TEST_CASE() [5/25]

◆ BOOST_AUTO_TEST_CASE() [6/25]

◆ BOOST_AUTO_TEST_CASE() [7/25]

BOOST_AUTO_TEST_CASE ( FunctionArgumentValidation )

Definition at line 737 of file test_libeval_compiler.cpp.

References expectCompileError().

◆ BOOST_AUTO_TEST_CASE() [8/25]

◆ BOOST_AUTO_TEST_CASE() [9/25]

BOOST_AUTO_TEST_CASE ( IntrospectedColorProperties )

◆ BOOST_AUTO_TEST_CASE() [10/25]

◆ BOOST_AUTO_TEST_CASE() [11/25]

◆ BOOST_AUTO_TEST_CASE() [12/25]

BOOST_AUTO_TEST_CASE ( IntrospectedPropertyAvailability )

◆ BOOST_AUTO_TEST_CASE() [13/25]

◆ BOOST_AUTO_TEST_CASE() [14/25]

◆ BOOST_AUTO_TEST_CASE() [15/25]

BOOST_AUTO_TEST_CASE ( PairConditionsInSingleItemRules )

◆ BOOST_AUTO_TEST_CASE() [16/25]

BOOST_AUTO_TEST_CASE ( PairItemDependency )

◆ BOOST_AUTO_TEST_CASE() [17/25]

◆ BOOST_AUTO_TEST_CASE() [18/25]

BOOST_AUTO_TEST_CASE ( PropertyParentFallback )

◆ BOOST_AUTO_TEST_CASE() [19/25]

BOOST_AUTO_TEST_CASE ( ReceiverValidation )

Definition at line 649 of file test_libeval_compiler.cpp.

References expectCompileError(), and expectCompileSuccess().

◆ BOOST_AUTO_TEST_CASE() [20/25]

◆ BOOST_AUTO_TEST_CASE() [21/25]

BOOST_AUTO_TEST_CASE ( SimpleExpressions )

Definition at line 142 of file test_libeval_compiler.cpp.

References testEvalExpr().

◆ BOOST_AUTO_TEST_CASE() [22/25]

◆ BOOST_AUTO_TEST_CASE() [23/25]

◆ BOOST_AUTO_TEST_CASE() [24/25]

BOOST_AUTO_TEST_CASE ( UnitlessStringProperties )

◆ BOOST_AUTO_TEST_CASE() [25/25]

◆ expectCompileError()

static void expectCompileError ( const wxString & aExpr)
static

◆ expectCompileSuccess()

static void expectCompileSuccess ( const wxString & aExpr)
static

◆ testEvalExpr()