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

Test suite for PCB_RENDER_SETTINGS. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcb_painter.h>
#include <pcb_point.h>
#include <layer_ids.h>
#include <settings/color_settings.h>
#include <board.h>
#include <base_units.h>
#include <pcb_track.h>
#include <pcb_view.h>
#include <footprint.h>
#include <pad.h>
#include <gal/gal_display_options.h>
#include <gal/graphics_abstraction_layer.h>

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.
 
 BOOST_AUTO_TEST_CASE (BlindViaHoleKeepsLayerPairColours)
 
 BOOST_AUTO_TEST_CASE (BackdrilledViaKeepsIndicatorColours)
 
 BOOST_AUTO_TEST_CASE (BackdrilledPadKeepsIndicatorColours)
 

Detailed Description

Test suite for PCB_RENDER_SETTINGS.

Definition in file test_pcb_render_settings.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( AllPointLayersMapToLayerPoints )

Test that multiple board layers all map to LAYER_POINTS color.

Definition at line 89 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/5]

◆ BOOST_AUTO_TEST_CASE() [3/5]

◆ BOOST_AUTO_TEST_CASE() [4/5]

◆ BOOST_AUTO_TEST_CASE() [5/5]

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 68 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().