KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_text_eval_parser.cpp File Reference

Test suite for text_eval_parser routines. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <text_eval/text_eval_wrapper.h>
#include <chrono>
#include <cmath>
#include <regex>
#include <wx/wxcrt.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (BasicArithmetic)
 Declare the test suite.
 
 BOOST_AUTO_TEST_CASE (VariableSubstitution)
 Test variable substitution.
 
 BOOST_AUTO_TEST_CASE (StringOperations)
 Test string operations and concatenation.
 
 BOOST_AUTO_TEST_CASE (MathematicalFunctions)
 Test mathematical functions.
 
 BOOST_AUTO_TEST_CASE (StringFunctions)
 Test string manipulation functions.
 
 BOOST_AUTO_TEST_CASE (FormattingFunctions)
 Test formatting functions.
 
 BOOST_AUTO_TEST_CASE (DateTimeFunctions)
 Test date and time functions.
 
 BOOST_AUTO_TEST_CASE (ConditionalFunctions)
 Test conditional functions.
 
 BOOST_AUTO_TEST_CASE (RandomFunctions)
 Test random functions.
 
 BOOST_AUTO_TEST_CASE (ErrorHandling)
 Test error handling and edge cases.
 
 BOOST_AUTO_TEST_CASE (ComplexExpressions)
 Test complex nested expressions.
 
 BOOST_AUTO_TEST_CASE (Performance)
 Test performance with large expressions.
 

Detailed Description

Test suite for text_eval_parser routines.

Definition in file test_text_eval_parser.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/12]

BOOST_AUTO_TEST_CASE ( BasicArithmetic )

Declare the test suite.

Test basic arithmetic operations

Definition at line 47 of file test_text_eval_parser.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), and result.

◆ BOOST_AUTO_TEST_CASE() [2/12]

BOOST_AUTO_TEST_CASE ( ComplexExpressions )

◆ BOOST_AUTO_TEST_CASE() [3/12]

BOOST_AUTO_TEST_CASE ( ConditionalFunctions )

◆ BOOST_AUTO_TEST_CASE() [4/12]

BOOST_AUTO_TEST_CASE ( DateTimeFunctions )

Test date and time functions.

Definition at line 339 of file test_text_eval_parser.cpp.

References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::HasErrors(), and result.

◆ BOOST_AUTO_TEST_CASE() [5/12]

BOOST_AUTO_TEST_CASE ( ErrorHandling )

Test error handling and edge cases.

Definition at line 456 of file test_text_eval_parser.cpp.

References EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::HasErrors(), and result.

◆ BOOST_AUTO_TEST_CASE() [6/12]

BOOST_AUTO_TEST_CASE ( FormattingFunctions )

◆ BOOST_AUTO_TEST_CASE() [7/12]

BOOST_AUTO_TEST_CASE ( MathematicalFunctions )

Test mathematical functions.

Definition at line 201 of file test_text_eval_parser.cpp.

References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), and result.

◆ BOOST_AUTO_TEST_CASE() [8/12]

BOOST_AUTO_TEST_CASE ( Performance )

Test performance with large expressions.

Definition at line 566 of file test_text_eval_parser.cpp.

References end, EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::HasErrors(), and result.

◆ BOOST_AUTO_TEST_CASE() [9/12]

BOOST_AUTO_TEST_CASE ( RandomFunctions )

Test random functions.

Definition at line 433 of file test_text_eval_parser.cpp.

References EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::HasErrors(), and result.

◆ BOOST_AUTO_TEST_CASE() [10/12]

BOOST_AUTO_TEST_CASE ( StringFunctions )

◆ BOOST_AUTO_TEST_CASE() [11/12]

BOOST_AUTO_TEST_CASE ( StringOperations )

◆ BOOST_AUTO_TEST_CASE() [12/12]

BOOST_AUTO_TEST_CASE ( VariableSubstitution )