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

Test suite for PCB_RENDER_SETTINGS. More...

Go to the source code of this file.

Classes

class  TEST_PCB_RENDER_SETTINGS_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (PointLayerColorIsVisible)
 Test that PCB_RENDER_SETTINGS::GetColor returns a visible color for POINT layers.
 
 BOOST_AUTO_TEST_CASE (AllPointLayersMapToLayerPoints)
 Test that multiple board layers all map to LAYER_POINTS color.
 

Detailed Description

Test suite for PCB_RENDER_SETTINGS.

Definition in file test_pcb_render_settings.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( AllPointLayersMapToLayerPoints )

Test that multiple board layers all map to LAYER_POINTS color.

Definition at line 85 of file test_pcb_render_settings.cpp.

References B_Cu, B_SilkS, Edge_Cuts, F_Cu, F_SilkS, LAYER_POINTS, POINT_LAYER_FOR, BOARD_ITEM::SetLayer(), and User_1.

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( PointLayerColorIsVisible )

Test that PCB_RENDER_SETTINGS::GetColor returns a visible color for POINT layers.

This is a regression test for issue #22634 where pressing ESC caused footprint points to vanish because UpdateAllLayersColor() was requesting the color for the virtual POINT layer (LAYER_POINT_START + boardLayer), which had no color defined and returned transparent.

Definition at line 64 of file test_pcb_render_settings.cpp.

References KIGFX::COLOR4D::a, BOOST_AUTO_TEST_CASE(), F_SilkS, LAYER_POINTS, POINT_LAYER_FOR, and BOARD_ITEM::SetLayer().