KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_plot_controller.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <filesystem>
#include <memory>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
#include <pcbplot.h>
#include <plotcontroller.h>
#include <pcb_plot_params.h>
#include <pcbnew_utils/board_file_utils.h>
#include <pcbnew_utils/board_test_utils.h>
#include <settings/settings_manager.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (MultiLayerDxfPlot)
 Test that plotting multiple layers sequentially via PLOT_CONTROLLER does not crash.
 
 BOOST_AUTO_TEST_CASE (MultiLayerSvgPlot)
 Test plotting multiple layers with SVG format.
 
 BOOST_AUTO_TEST_CASE (MultiLayerGerberPlot)
 Test plotting multiple layers with Gerber format.
 
 BOOST_AUTO_TEST_CASE (MultiLayerPdfPlot)
 Test plotting multiple layers with PDF format (should work without crash).
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( MultiLayerDxfPlot )

Test that plotting multiple layers sequentially via PLOT_CONTROLLER does not crash.

This reproduces GitLab issue #23171 where plotting 2 layers from the Python API causes a SIGSEGV because Pgm() is called during a code path that is only valid in a GUI context.

Definition at line 77 of file test_plot_controller.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), PLOT_CONTROLLER::ClosePlot(), DXF, F_Cu, F_Fab, PLOT_CONTROLLER::GetPlotFileName(), PLOT_CONTROLLER::OpenPlotfile(), PLOT_CONTROLLER::PlotLayer(), and PLOT_CONTROLLER::SetLayer().

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( MultiLayerGerberPlot )

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( MultiLayerPdfPlot )

Test plotting multiple layers with PDF format (should work without crash).

Definition at line 170 of file test_plot_controller.cpp.

References BOOST_REQUIRE(), PLOT_CONTROLLER::ClosePlot(), F_Cu, F_Fab, PLOT_CONTROLLER::GetPlotFileName(), PLOT_CONTROLLER::OpenPlotfile(), PDF, PLOT_CONTROLLER::PlotLayer(), and PLOT_CONTROLLER::SetLayer().

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( MultiLayerSvgPlot )