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

Test suite for text_eval_parser date and time functionality. More...

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

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (DateFormatting)
 
 BOOST_AUTO_TEST_CASE (CJKDateFormatting)
 Test CJK (Chinese, Japanese, Korean) date formatting.
 
 BOOST_AUTO_TEST_CASE (CJKDateParsing)
 Test CJK (Chinese, Japanese, Korean) date parsing with datestring function.
 
 BOOST_AUTO_TEST_CASE (CurrentDateTime)
 Test current date/time functions.
 
 BOOST_AUTO_TEST_CASE (DateArithmetic)
 Test date arithmetic and calculations.
 
 BOOST_AUTO_TEST_CASE (DateEdgeCases)
 Test date edge cases and boundary conditions.
 
 BOOST_AUTO_TEST_CASE (DateFormattingMixed)
 Test date formatting with mixed expressions.
 
 BOOST_AUTO_TEST_CASE (DatePerformance)
 Test performance of date operations.
 

Detailed Description

Test suite for text_eval_parser date and time functionality.

Definition in file test_text_eval_parser_datetime.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/8]

BOOST_AUTO_TEST_CASE ( CJKDateFormatting )

◆ BOOST_AUTO_TEST_CASE() [2/8]

BOOST_AUTO_TEST_CASE ( CJKDateParsing )

Test CJK (Chinese, Japanese, Korean) date parsing with datestring function.

Definition at line 167 of file test_text_eval_parser_datetime.cpp.

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

◆ BOOST_AUTO_TEST_CASE() [3/8]

BOOST_AUTO_TEST_CASE ( CurrentDateTime )

Test current date/time functions.

Definition at line 245 of file test_text_eval_parser_datetime.cpp.

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

◆ BOOST_AUTO_TEST_CASE() [4/8]

BOOST_AUTO_TEST_CASE ( DateArithmetic )

Test date arithmetic and calculations.

Definition at line 291 of file test_text_eval_parser_datetime.cpp.

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

◆ BOOST_AUTO_TEST_CASE() [5/8]

BOOST_AUTO_TEST_CASE ( DateEdgeCases )

Test date edge cases and boundary conditions.

Definition at line 346 of file test_text_eval_parser_datetime.cpp.

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

◆ BOOST_AUTO_TEST_CASE() [6/8]

◆ BOOST_AUTO_TEST_CASE() [7/8]

BOOST_AUTO_TEST_CASE ( DateFormattingMixed )

Test date formatting with mixed expressions.

Definition at line 406 of file test_text_eval_parser_datetime.cpp.

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

◆ BOOST_AUTO_TEST_CASE() [8/8]

BOOST_AUTO_TEST_CASE ( DatePerformance )

Test performance of date operations.

Definition at line 451 of file test_text_eval_parser_datetime.cpp.

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