KiCad PCB EDA Suite
|
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. | |
Test suite for text_eval_parser routines.
Definition in file test_text_eval_parser.cpp.
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 | ( | ComplexExpressions | ) |
Test complex nested expressions.
Definition at line 510 of file test_text_eval_parser.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().
BOOST_AUTO_TEST_CASE | ( | ConditionalFunctions | ) |
Test conditional functions.
Definition at line 397 of file test_text_eval_parser.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().
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 | ( | 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 | ( | FormattingFunctions | ) |
Test formatting functions.
Definition at line 305 of file test_text_eval_parser.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), and result.
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 | ( | 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 | ( | 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 | ( | StringFunctions | ) |
Test string manipulation functions.
Definition at line 271 of file test_text_eval_parser.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().
BOOST_AUTO_TEST_CASE | ( | StringOperations | ) |
Test string operations and concatenation.
Definition at line 163 of file test_text_eval_parser.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().
BOOST_AUTO_TEST_CASE | ( | VariableSubstitution | ) |
Test variable substitution.
Definition at line 105 of file test_text_eval_parser.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().