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

Test suite for MARKUP_PARSER. More...

Go to the source code of this file.

Classes

struct  PARSE_CASE
 

Functions

void nodeToString (std::unique_ptr< MARKUP::NODE > &aNode, std::string &aStringToPopulate)
 Declare the test suite.
 
 BOOST_AUTO_TEST_CASE (Parse)
 Test the #Parse method.
 
 BOOST_AUTO_TEST_CASE (OverbarMultipleSpacesWidth)
 Verify that LinebreakText preserves multiple spaces inside overbar markup and that the overbar word receives a nonzero width so line-wrapping accounts for it.
 

Detailed Description

Test suite for MARKUP_PARSER.

Definition in file test_markup_parser.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( OverbarMultipleSpacesWidth )

Verify that LinebreakText preserves multiple spaces inside overbar markup and that the overbar word receives a nonzero width so line-wrapping accounts for it.

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/22913

Definition at line 135 of file test_markup_parser.cpp.

References ANGLE_0, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIFONT::FONT::GetTextAsGlyphs(), KIFONT::FONT::LinebreakText(), KIFONT::STROKE_FONT::LoadFont(), text, and VECTOR2< T >::x.

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( Parse )

Test the #Parse method.

Definition at line 67 of file test_markup_parser.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), nodeToString(), MARKUP::MARKUP_PARSER::Parse(), and result.

◆ nodeToString()

void nodeToString ( std::unique_ptr< MARKUP::NODE > & aNode,
std::string & aStringToPopulate )

Declare the test suite.

Definition at line 38 of file test_markup_parser.cpp.

References nodeToString().

Referenced by BOOST_AUTO_TEST_CASE(), and nodeToString().