KiCad PCB EDA Suite
Loading...
Searching...
No Matches
text_eval Directory Reference

Files

 test_text_eval_numeric_compat.cpp
 Test suite for text_eval system using examples adapted from numeric_evaluator tests.
 
 test_text_eval_parser.cpp
 Test suite for text_eval_parser routines.
 
 test_text_eval_parser_core.cpp
 Test suite for low-level text_eval_parser functionality.
 
 test_text_eval_parser_datetime.cpp
 Test suite for text_eval_parser date and time functionality.
 
 test_text_eval_parser_integration.cpp
 Integration tests for text_eval_parser functionality including real-world scenarios.
 
 test_text_eval_render.cpp
 Test rendering helper functions with expression evaluation.
 

Detailed Description

This directory contains test suites for the KiCad text evaluation parser functionality.

Test Files

test_text_eval_parser.cpp

High-level integration tests using the EXPRESSION_EVALUATOR wrapper class.

test_text_eval_parser_core.cpp

Low-level unit tests for the core parser components. Tests the internal API including:

test_text_eval_parser_datetime.cpp

Specialized tests for date and time functionality:

test_text_eval_parser_integration.cpp

Integration tests simulating real-world KiCad usage scenarios:

Tested Functions

Mathematical Functions

String Functions

Date/Time Functions

Conditional Functions

Utility Functions

Arithmetic Operators

Variable Syntax

Variables are referenced using ${variable_name} syntax and can be:

Expression Syntax

Calculations are embedded in text using @{expression} syntax:

Error Handling

The parser collects errors for later diagnostics. However, a string with multiple expressions may be partially evaluated. It will return an error for every expression that was not fully evaluated.