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

Go to the source code of this file.

Classes

struct  LABEL_BBOX_FIXTURE
 Test fixture for label bounding box tests. More...
 

Functions

 BOOST_AUTO_TEST_CASE (TextBoundingBoxStrokeFont)
 Test that SCH_TEXT bounding boxes are correct with the default KiCad font (stroke font).
 
 BOOST_AUTO_TEST_CASE (TextBoundingBoxOutlineFont)
 Test that SCH_TEXT bounding boxes are correct with an outline font.
 
 BOOST_AUTO_TEST_CASE (TextBoundingBoxVariousStrings)
 Test various text strings to ensure bounding boxes are correct.
 
 BOOST_AUTO_TEST_CASE (LabelBodyBoundingBoxStrokeFont)
 Test that SCH_LABEL body bounding boxes are correct with stroke font.
 
 BOOST_AUTO_TEST_CASE (LabelBodyBoundingBoxOutlineFont)
 Test that SCH_LABEL body bounding boxes are correct with outline font.
 
 BOOST_AUTO_TEST_CASE (GlobalLabelBodyBoundingBoxStrokeFont)
 Test that SCH_GLOBALLABEL body bounding boxes are correct with stroke font.
 
 BOOST_AUTO_TEST_CASE (GlobalLabelBodyBoundingBoxOutlineFont)
 Test that SCH_GLOBALLABEL body bounding boxes are correct with outline font.
 
 BOOST_AUTO_TEST_CASE (HierLabelBodyBoundingBoxStrokeFont)
 Test that SCH_HIERLABEL body bounding boxes are correct with stroke font.
 
 BOOST_AUTO_TEST_CASE (HierLabelBodyBoundingBoxOutlineFont)
 Test that SCH_HIERLABEL body bounding boxes are correct with outline font.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/9]

BOOST_AUTO_TEST_CASE ( GlobalLabelBodyBoundingBoxOutlineFont )

Test that SCH_GLOBALLABEL body bounding boxes are correct with outline font.

This is the most visible case of the bug where the bounding box was double-width.

Definition at line 278 of file test_label_bounding_box.cpp.

References BOOST_TEST_MESSAGE(), EDA_TEXT::SetFont(), and EDA_TEXT::SetTextSize().

◆ BOOST_AUTO_TEST_CASE() [2/9]

BOOST_AUTO_TEST_CASE ( GlobalLabelBodyBoundingBoxStrokeFont )

Test that SCH_GLOBALLABEL body bounding boxes are correct with stroke font.

Definition at line 263 of file test_label_bounding_box.cpp.

References EDA_TEXT::SetFont(), and EDA_TEXT::SetTextSize().

◆ BOOST_AUTO_TEST_CASE() [3/9]

BOOST_AUTO_TEST_CASE ( HierLabelBodyBoundingBoxOutlineFont )

Test that SCH_HIERLABEL body bounding boxes are correct with outline font.

Definition at line 314 of file test_label_bounding_box.cpp.

References BOOST_TEST_MESSAGE(), EDA_TEXT::SetFont(), and EDA_TEXT::SetTextSize().

◆ BOOST_AUTO_TEST_CASE() [4/9]

BOOST_AUTO_TEST_CASE ( HierLabelBodyBoundingBoxStrokeFont )

Test that SCH_HIERLABEL body bounding boxes are correct with stroke font.

Definition at line 300 of file test_label_bounding_box.cpp.

References EDA_TEXT::SetFont(), and EDA_TEXT::SetTextSize().

◆ BOOST_AUTO_TEST_CASE() [5/9]

BOOST_AUTO_TEST_CASE ( LabelBodyBoundingBoxOutlineFont )

Test that SCH_LABEL body bounding boxes are correct with outline font.

Definition at line 241 of file test_label_bounding_box.cpp.

References BOOST_TEST_MESSAGE(), EDA_TEXT::SetFont(), and EDA_TEXT::SetTextSize().

◆ BOOST_AUTO_TEST_CASE() [6/9]

BOOST_AUTO_TEST_CASE ( LabelBodyBoundingBoxStrokeFont )

Test that SCH_LABEL body bounding boxes are correct with stroke font.

Definition at line 227 of file test_label_bounding_box.cpp.

References EDA_TEXT::SetFont(), and EDA_TEXT::SetTextSize().

◆ BOOST_AUTO_TEST_CASE() [7/9]

BOOST_AUTO_TEST_CASE ( TextBoundingBoxOutlineFont )

Test that SCH_TEXT bounding boxes are correct with an outline font.

Definition at line 161 of file test_label_bounding_box.cpp.

References BOOST_TEST_MESSAGE(), KIFONT::FONT::GetName(), and text.

◆ BOOST_AUTO_TEST_CASE() [8/9]

BOOST_AUTO_TEST_CASE ( TextBoundingBoxStrokeFont )

Test that SCH_TEXT bounding boxes are correct with the default KiCad font (stroke font).

Definition at line 146 of file test_label_bounding_box.cpp.

References BOOST_AUTO_TEST_CASE(), and text.

◆ BOOST_AUTO_TEST_CASE() [9/9]

BOOST_AUTO_TEST_CASE ( TextBoundingBoxVariousStrings )

Test various text strings to ensure bounding boxes are correct.

Definition at line 185 of file test_label_bounding_box.cpp.

References text.