|
KiCad PCB EDA Suite
|
Integration tests for text_eval_parser functionality including real-world scenarios. More...
#include <qa_utils/file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <common.h>#include <git/git_backend.h>#include <git/kicad_git_memory.h>#include <git/libgit_backend.h>#include <git/project_git_utils.h>#include <text_eval/text_eval_environment.h>#include <text_eval/text_eval_vcs.h>#include <text_eval/text_eval_wrapper.h>#include <title_block.h>#include <wx/filefn.h>#include <wx/filename.h>#include <fmt/ranges.h>#include <chrono>#include <regex>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (VcsNativeProjectContextPaths) | |
| Declare the test suite. | |
| BOOST_AUTO_TEST_CASE (EnvironmentFrameCapturesDynamicSources) | |
| BOOST_AUTO_TEST_CASE (RealWorldScenarios) | |
| Test real-world expression scenarios. | |
| BOOST_AUTO_TEST_CASE (CallbackVariableResolution) | |
| Test callback-based variable resolution. | |
| BOOST_AUTO_TEST_CASE (ThreadSafety) | |
| Test concurrent/thread safety (basic test) | |
| BOOST_AUTO_TEST_CASE (MemoryManagement) | |
| Test memory management and large expressions. | |
| BOOST_AUTO_TEST_CASE (ParsingEdgeCases) | |
| Test edge cases in parsing and evaluation. | |
| BOOST_AUTO_TEST_CASE (RealWorldPerformance) | |
| Test performance with realistic workloads. | |
Integration tests for text_eval_parser functionality including real-world scenarios.
Definition in file test_text_eval_parser_integration.cpp.
| BOOST_AUTO_TEST_CASE | ( | CallbackVariableResolution | ) |
Test callback-based variable resolution.
Definition at line 357 of file test_text_eval_parser_integration.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::HasErrors(), calc_parser::MakeError(), calc_parser::MakeValue(), and result.
| BOOST_AUTO_TEST_CASE | ( | EnvironmentFrameCapturesDynamicSources | ) |
Definition at line 178 of file test_text_eval_parser_integration.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), TEXT_EVAL::ENVIRONMENT::Current(), TEXT_EVAL::ENVIRONMENT::SOURCE_VALUES::environmentVariables, EXPRESSION_EVALUATOR::Evaluate(), ExpandEnvVarSubstitutions(), TITLE_BLOCK::GetCurrentDate(), TITLE_BLOCK::GetCurrentTimeHHMMSS(), TITLE_BLOCK::GetCurrentTimeLocale(), TEXT_EVAL::ENVIRONMENT::SOURCE_VALUES::randomUsed, and TEXT_EVAL::ENVIRONMENT::SOURCE_VALUES::time.
| BOOST_AUTO_TEST_CASE | ( | MemoryManagement | ) |
Test memory management and large expressions.
Definition at line 452 of file test_text_eval_parser_integration.cpp.
References BOOST_CHECK_EQUAL(), EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::HasErrors(), and result.
| BOOST_AUTO_TEST_CASE | ( | ParsingEdgeCases | ) |
Test edge cases in parsing and evaluation.
Definition at line 484 of file test_text_eval_parser_integration.cpp.
References EXPRESSION_EVALUATOR::Evaluate(), expected, EXPRESSION_EVALUATOR::GetErrorSummary(), EXPRESSION_EVALUATOR::HasErrors(), and result.
| BOOST_AUTO_TEST_CASE | ( | RealWorldPerformance | ) |
Test performance with realistic workloads.
Definition at line 569 of file test_text_eval_parser_integration.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), end, EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().
| BOOST_AUTO_TEST_CASE | ( | RealWorldScenarios | ) |
Test real-world expression scenarios.
Definition at line 227 of file test_text_eval_parser_integration.cpp.
References EXPRESSION_EVALUATOR::Evaluate(), EXPRESSION_EVALUATOR::GetErrorSummary(), EXPRESSION_EVALUATOR::HasErrors(), result, and EXPRESSION_EVALUATOR::SetVariable().
| BOOST_AUTO_TEST_CASE | ( | ThreadSafety | ) |
Test concurrent/thread safety (basic test)
Definition at line 424 of file test_text_eval_parser_integration.cpp.
| BOOST_AUTO_TEST_CASE | ( | VcsNativeProjectContextPaths | ) |
Declare the test suite.
Definition at line 50 of file test_text_eval_parser_integration.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), EXPRESSION_EVALUATOR::Evaluate(), TEXT_EVAL_VCS::GetContextIsFile(), TEXT_EVAL_VCS::GetContextPath(), KIGIT::PROJECT_GIT_UTILS::GetCurrentHash(), KI_TEST::GetEeschemaTestDataDir(), EXPRESSION_EVALUATOR::GetErrorSummary(), GetGitBackend(), EXPRESSION_EVALUATOR::HasErrors(), index, LIBGIT_BACKEND::Init(), path, KI_TEST::SCOPED_TEMP_DIR::PathStr(), TEXT_EVAL_VCS::ReadSource(), result, SetGitBackend(), LIBGIT_BACKEND::Shutdown(), and TEXT_EVAL::ENVIRONMENT::SOURCE_VALUES::vcsValues.