|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <base_units.h>#include <jobs/job_export_pcb_3d.h>#include <jobs/jobset.h>#include <kiid.h>#include <richio.h>#include <filesystem>#include <system_error>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | JOB_EXPORT_PCB_3D_TEST_FIXTURE |
| The 3D model export job settings must survive a real save/load cycle through a .kicad_jobset on disk. More... | |
Functions | |
| static std::vector< std::pair< const char *, bool * > > | boolSettings (JOB_EXPORT_PCB_3D &aJob) |
| Every boolean setting of the job, so that adding a field without a JSON mapping fails the round trip below instead of silently resetting itself on the user's next reload. | |
| BOOST_AUTO_TEST_CASE (FiltersSurviveDiskRoundTrip) | |
| The component filter and the net filter are the two fields called out in the issue. | |
| BOOST_AUTO_TEST_CASE (BooleanSettingsSurviveDiskRoundTrip) | |
| BOOST_AUTO_TEST_CASE (ValueSettingsSurviveDiskRoundTrip) | |
| The remaining non-boolean settings, which the table above cannot flip. | |
|
static |
Every boolean setting of the job, so that adding a field without a JSON mapping fails the round trip below instead of silently resetting itself on the user's next reload.
Definition at line 88 of file test_job_export_pcb_3d.cpp.
References JOB_EXPORT_PCB_3D::m_3dparams, EXPORTER_STEP_PARAMS::m_BoardOnly, EXPORTER_STEP_PARAMS::m_CutViasInBody, EXPORTER_STEP_PARAMS::m_ExportBoardBody, EXPORTER_STEP_PARAMS::m_ExportComponents, EXPORTER_STEP_PARAMS::m_ExportInnerCopper, EXPORTER_STEP_PARAMS::m_ExportPads, EXPORTER_STEP_PARAMS::m_ExportSilkscreen, EXPORTER_STEP_PARAMS::m_ExportSoldermask, EXPORTER_STEP_PARAMS::m_ExportTracksVias, EXPORTER_STEP_PARAMS::m_ExportZones, EXPORTER_STEP_PARAMS::m_ExtraPadThickness, EXPORTER_STEP_PARAMS::m_FillAllVias, EXPORTER_STEP_PARAMS::m_FuseShapes, JOB_EXPORT_PCB_3D::m_hasUserOrigin, EXPORTER_STEP_PARAMS::m_IncludeDNP, EXPORTER_STEP_PARAMS::m_IncludeUnspecified, EXPORTER_STEP_PARAMS::m_OptimizeStep, EXPORTER_STEP_PARAMS::m_Overwrite, EXPORTER_STEP_PARAMS::m_SubstModels, EXPORTER_STEP_PARAMS::m_UseDefinedOrigin, EXPORTER_STEP_PARAMS::m_UseDrillOrigin, EXPORTER_STEP_PARAMS::m_UseGridOrigin, EXPORTER_STEP_PARAMS::m_UsePcbCenterOrigin, and JOB_EXPORT_PCB_3D::m_vrmlRelativePaths.
Referenced by BOOST_AUTO_TEST_CASE().
| BOOST_AUTO_TEST_CASE | ( | BooleanSettingsSurviveDiskRoundTrip | ) |
Definition at line 151 of file test_job_export_pcb_3d.cpp.
References boolSettings(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_CONTEXT(), expected, flag, and jobset.
| BOOST_AUTO_TEST_CASE | ( | FiltersSurviveDiskRoundTrip | ) |
The component filter and the net filter are the two fields called out in the issue.
Neither was written to the jobset, so the reporter's second job carries no filter at all.
Definition at line 126 of file test_job_export_pcb_3d.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), jobset, JOB_EXPORT_PCB_3D::m_3dparams, EXPORTER_STEP_PARAMS::m_ComponentFilter, and EXPORTER_STEP_PARAMS::m_NetFilter.
| BOOST_AUTO_TEST_CASE | ( | ValueSettingsSurviveDiskRoundTrip | ) |
The remaining non-boolean settings, which the table above cannot flip.
Definition at line 184 of file test_job_export_pcb_3d.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), JOB::GetConfiguredOutputPath(), EXPORTER_STEP_PARAMS::GLB, JOB_EXPORT_PCB_3D::GLB, JOB_EXPORT_PCB_3D::INCH, jobset, JOB_EXPORT_PCB_3D::m_3dparams, EXPORTER_STEP_PARAMS::m_BoardOutlinesChainingEpsilon, EXPORTER_STEP_PARAMS::m_Format, JOB_EXPORT_PCB_3D::m_format, EXPORTER_STEP_PARAMS::m_Origin, JOB_EXPORT_PCB_3D::m_variant, JOB_EXPORT_PCB_3D::m_vrmlModelDir, JOB_EXPORT_PCB_3D::m_vrmlUnits, pcbIUScale, JOB::SetConfiguredOutputPath(), JOB_EXPORT_PCB_3D::SetStepFormat(), VECTOR2< T >::x, and VECTOR2< T >::y.