|
KiCad PCB EDA Suite
|
Test suite for IPC-2581 export validation. More...
#include <pcbnew_utils/board_test_utils.h>#include <pcbnew_utils/board_file_utils.h>#include <qa_utils/env_var_utils.h>#include <qa_utils/file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew/pcb_io/ipc2581/pcb_io_ipc2581.h>#include <pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>#include <pcbnew/pcb_io/ipc2581/ipc2581_export_job.h>#include <pcbnew/drill/drill_enumerator.h>#include <pcbnew/exporters/fab_model/fab_pin.h>#include <board.h>#include <board_design_settings.h>#include <board_stackup_manager/board_stackup.h>#include <footprint.h>#include <netinfo.h>#include <pad.h>#include <pcb_shape.h>#include <pcb_textbox.h>#include <pcb_track.h>#include <base_units.h>#include <jobs/job_export_pcb_ipc2581.h>#include <reporter.h>#include <wx/dir.h>#include <wx/file.h>#include <wx/filename.h>#include <wx/process.h>#include <wx/txtstrm.h>#include <wx/utils.h>#include <wx/xml/xml.h>#include <wx/wfstream.h>#include <wx/zipstrm.h>#include <cmath>#include <fstream>#include <regex>#include <set>#include <sstream>#include <tuple>Go to the source code of this file.
Classes | |
| struct | IPC2581_EXPORT_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (Ipc2581PadHoleMatchesNcDrill) | |
| BOOST_AUTO_TEST_CASE (Ipc2581User10FeaturesHaveDeclaredLayer) | |
| BOOST_AUTO_TEST_CASE (Ipc2581LogicalNetUsesPackagePinName) | |
| BOOST_AUTO_TEST_CASE (Ipc2581ViaProtectionUsesBoardDefaults) | |
| BOOST_AUTO_TEST_CASE (CompressedExportKeepsXmlAtArchiveRoot) | |
| BOOST_AUTO_TEST_CASE (EmptyIpcSectionSelectionFailsExport) | |
| BOOST_AUTO_TEST_CASE (Ipc2581VariantPropertySelectsPopulation) | |
| BOOST_AUTO_TEST_CASE (IpcBackBlindDrillSpanUsesStackOrder) | |
| BOOST_AUTO_TEST_CASE (IpcExportLeavesBoardStackupUntouched) | |
| BOOST_AUTO_TEST_CASE (SurfaceFinishExport) | |
| Test that surface finish is exported correctly (Issue #22690) | |
| BOOST_AUTO_TEST_CASE (NoSurfaceFinishExport) | |
| Test that boards without surface finish don't generate coating layers. | |
| BOOST_AUTO_TEST_CASE (RequiredSchemaCheckRejectsMissingXmllint) | |
| BOOST_AUTO_TEST_CASE (SchemaValidationRejectsInvalidDocument) | |
| BOOST_AUTO_TEST_CASE (XmllintFailureWithoutStderrIsReported) | |
| BOOST_AUTO_TEST_CASE (SchemaValidationVersionB) | |
| Validate IPC-2581B export against schema for multiple boards. | |
| BOOST_AUTO_TEST_CASE (SchemaValidationVersionC) | |
| Validate IPC-2581C export against schema for multiple boards. | |
| BOOST_AUTO_TEST_CASE (FunctionModeSchemaValidation) | |
| Test export of boards with complex features. | |
| BOOST_AUTO_TEST_CASE (FunctionModeSuppressedReferences) | |
| Section keys the Table 4 data sets never produce on their own, where a referring attribute has to be suppressed rather than its section dragged back in. | |
| BOOST_AUTO_TEST_CASE (ComplexBoardExport) | |
| BOOST_AUTO_TEST_CASE (DegenerateTrackArcExportsAsLine) | |
| BOOST_AUTO_TEST_CASE (TextBoxUsesDrawPosition) | |
| Test that text boxes use their calculated drawing position in IPC-2581 output. | |
| BOOST_AUTO_TEST_CASE (SmdPadSolderMaskExport_Issue16658) | |
| Pads with authored F.Mask layers emit IPC-2581 mask features Issue #16658. | |
| static std::string | LayerFeatureRegion (const std::string &aXml, const std::string &aLayerRef) |
| Extract the text of the first LayerFeature block for a given layer reference. | |
| BOOST_AUTO_TEST_CASE (TentedThermalViaPadsDoNotOpenMask) | |
, or PinRef/@componentRef attributes, which are | |
Test that footprints with empty references produce valid XML attributes. Footprints with blank GetReference() must not produce empty refDes, RefDes/ schema-invalid qualified names. | |
| BOOST_AUTO_TEST_CASE (EmptyRefDesProducesValidXml) | |
| BOOST_AUTO_TEST_CASE (FlippedComponentRotation) | |
| Test that flipped component rotation is not inverted (Finding A / Issue #18013) | |
| BOOST_AUTO_TEST_CASE (ContentBomRef) | |
| Test that Content section includes BomRef when BOM is emitted. | |
| BOOST_AUTO_TEST_CASE (KnockoutTextMultiContour_Issue23968) | |
| Test that knockout text with holes emits schema-valid XML (Issue #23968) | |
| BOOST_AUTO_TEST_CASE (SecondaryDrillPostMachiningSpecs) | |
| Saved pad carries a front countersink and back counterbore. | |
| BOOST_AUTO_TEST_CASE (SlotCavityUsesDrillPosition) | |
| Offset slot location is the drill center saved by pcbnew. | |
| BOOST_AUTO_TEST_CASE (SlotCavityFullBoardSchema) | |
| Full pad_backdrill exports pass the B1 and C schemas including SlotCavity. | |
| BOOST_AUTO_TEST_CASE (BackdrillSpecEncoding) | |
| Verify IPC-2581 backdrill encoding matches the schema and expresses the correct must-not-cut layer. | |
| BOOST_AUTO_TEST_CASE (ExposedPadPasteRespected_Issue24318) | |
| Authored mask and paste pad layers govern exposed-pad IPC-2581 features Issue #24318. | |
| BOOST_AUTO_TEST_CASE (GrRectCornerRadius_Issue24754) | |
| Test that a rounded gr_rect keeps its corner radius on export (Issue #24754). | |
| BOOST_AUTO_TEST_CASE (BackOnlyMaskNoFrontOpening_Issue24753) | |
| Test that a back-only masked through-hole pad gets no F.Mask opening (Issue #24753). | |
| BOOST_AUTO_TEST_CASE (RoundRectMaskRadius_Issue24751) | |
| Test that a roundrect pad's mask aperture shrinks its radius with its size (Issue #24751). | |
| BOOST_AUTO_TEST_CASE (MultiLayerFootprintGraphic_Issue24752) | |
| Test that a multi-layer footprint graphic is emitted on every layer (Issue #24752). | |
| BOOST_AUTO_TEST_CASE (SolderMaskMarginExpandsMaskPrimitive_Issue24749) | |
| Test that the per-layer solder mask margin expands the exported mask primitive (Issue #24749). | |
| BOOST_AUTO_TEST_CASE (SchemaValidation_Issue25149) | |
| Validate the minimal boards attached to issue #25149 against the IPC-2581C schema. | |
| BOOST_AUTO_TEST_CASE (NoClosedOutline_Issue25149) | |
| A board with no closed outline must export without crashing and omit Profile (Issue #25149). | |
| BOOST_AUTO_TEST_CASE (ProcessLayerViaPads_Issue25149) | |
| Process-layer via pads must sit in a Set at the via position (Issue #25149). | |
| BOOST_AUTO_TEST_CASE (RoundUnequalDrillHasPadstackHole) | |
| BOOST_AUTO_TEST_CASE (SlotPostMachiningSpecRefs) | |
| BOOST_AUTO_TEST_CASE (NpthMaskOnlyOpeningUsesAuthoredSize) | |
| BOOST_AUTO_TEST_CASE (Ipc2581ComponentAndPartNamesStayInTheirOwnNamespaces) | |
Test suite for IPC-2581 export validation.
Tests per GitLab issues:
Definition in file test_ipc2581_export.cpp.
| BOOST_AUTO_TEST_CASE | ( | BackdrillSpecEncoding | ) |
Verify IPC-2581 backdrill encoding matches the schema and expresses the correct must-not-cut layer.
KiCad's PADSTACK::DRILL_PROPS::end is the must-cut layer (per the UI "must-cut" labels). The IPC-2581 standard expects the must-not-cut layer, which is the next signal layer past the must-cut layer. The exporter must emit one Spec containing three sibling Backdrill children with type START_LAYER, MUST_NOT_CUT_LAYER, and MAX_STUB_LENGTH, each carrying its value in a Property child.
Definition at line 1681 of file test_ipc2581_export.cpp.
References BOARD::Add(), PADSTACK::ALL_LAYERS, B_Cu, BOOST_REQUIRE(), BOARD_STACKUP::BuildDefaultStackupList(), COUNTERSINK, F_Cu, BOARD::GetDesignSettings(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), In3_Cu, PADSTACK::NORMAL, pcbIUScale, BOARD::SetCopperLayerCount(), and via.
| BOOST_AUTO_TEST_CASE | ( | BackOnlyMaskNoFrontOpening_Issue24753 | ) |
Test that a back-only masked through-hole pad gets no F.Mask opening (Issue #24753).
A pad on *.Cu with an explicit B.Mask (and no F.Mask) must not be added to the F.Mask LayerFeature. The implicit-mask heuristic only applies when the pad authors no mask side.
Definition at line 1876 of file test_ipc2581_export.cpp.
References BOARD::Add(), FOOTPRINT::Add(), PADSTACK::ALL_LAYERS, B_Cu, B_Mask, BOOST_REQUIRE(), F_Cu, FOOTPRINT, LayerFeatureRegion(), KI_TEST::LoadStringData(), PADSTACK::NORMAL, OVAL, PAD, pad, pcbIUScale, PTH, BOARD::SetCopperLayerCount(), FOOTPRINT::SetPosition(), and FOOTPRINT::SetReference().
| BOOST_AUTO_TEST_CASE | ( | ComplexBoardExport | ) |
Definition at line 1100 of file test_ipc2581_export.cpp.
References BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | CompressedExportKeepsXmlAtArchiveRoot | ) |
Definition at line 620 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), GenerateIpc2581File(), JOB_EXPORT_PCB_IPC2581::m_compress, next(), KI_TEST::SCOPED_TEMP_DIR::Path(), reporter, and JOB::SetConfiguredOutputPath().
| BOOST_AUTO_TEST_CASE | ( | ContentBomRef | ) |
Test that Content section includes BomRef when BOM is emitted.
Definition at line 1421 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | DegenerateTrackArcExportsAsLine | ) |
Definition at line 1138 of file test_ipc2581_export.cpp.
References BOARD::Add(), BOOST_REQUIRE(), F_Cu, pcbIUScale, BOARD::SetCopperLayerCount(), PCB_TRACK::SetEnd(), BOARD_CONNECTED_ITEM::SetLayer(), PCB_ARC::SetMid(), BOARD_CONNECTED_ITEM::SetNet(), PCB_TRACK::SetStart(), and PCB_TRACK::SetWidth().
| BOOST_AUTO_TEST_CASE | ( | EmptyIpcSectionSelectionFailsExport | ) |
Definition at line 645 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), JOB_EXPORT_PCB_IPC2581::FromJson(), GenerateIpc2581File(), KI_TEST::SCOPED_TEMP_DIR::Path(), reporter, and JOB::SetConfiguredOutputPath().
| BOOST_AUTO_TEST_CASE | ( | EmptyRefDesProducesValidXml | ) |
Definition at line 1336 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), and BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | ExposedPadPasteRespected_Issue24318 | ) |
Authored mask and paste pad layers govern exposed-pad IPC-2581 features Issue #24318.
Definition at line 1759 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), F_Cu, F_Mask, F_Paste, LayerFeatureRegion(), pad, and paste.
| BOOST_AUTO_TEST_CASE | ( | FlippedComponentRotation | ) |
Test that flipped component rotation is not inverted (Finding A / Issue #18013)
IPC-2581C 3.3.2 defines positive rotation as CCW from board top. mirror="true" handles the X-axis negation for bottom components. The component rotation must be the normalized board-top angle, NOT its inverse.
Definition at line 1376 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | FunctionModeSchemaValidation | ) |
Test export of boards with complex features.
Tests boards with zones, custom pads, and other features that may exercise edge cases in the IPC-2581 exporter. Every IPC-2581 data set must produce a schema-valid file in both revisions, including with net names and reference designators withheld.
Definition at line 1011 of file test_ipc2581_export.cpp.
References BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | FunctionModeSuppressedReferences | ) |
Section keys the Table 4 data sets never produce on their own, where a referring attribute has to be suppressed rather than its section dragged back in.
Definition at line 1064 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), and BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | GrRectCornerRadius_Issue24754 | ) |
Test that a rounded gr_rect keeps its corner radius on export (Issue #24754).
The exporter used to emit a RectRound with all corner flags off and a radius of stroke_width/2, discarding the shape's real corner radius. A gr_rect with a 0.75 mm corner radius must round its corners and carry that radius in the RectRound primitive.
Definition at line 1828 of file test_ipc2581_export.cpp.
References BOARD::Add(), BOOST_REQUIRE(), Edge_Cuts, KI_TEST::LoadStringData(), pcbIUScale, RECTANGLE, BOARD::SetCopperLayerCount(), PCB_SHAPE::SetCornerRadius(), PCB_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), PCB_SHAPE::SetLayer(), PCB_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), and SOLID.
| BOOST_AUTO_TEST_CASE | ( | Ipc2581ComponentAndPartNamesStayInTheirOwnNamespaces | ) |
Definition at line 2426 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_CONTEXT(), name, and path.
| BOOST_AUTO_TEST_CASE | ( | Ipc2581LogicalNetUsesPackagePinName | ) |
Definition at line 488 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), BOARD_CONNECTED_ITEM::GetNetname(), FOOTPRINT::GetReference(), FAB::LegacySections(), FAB_PIN::m_name, MakeFabPin(), pad, pin, FAB::SectionKeyString(), and FAB::SECTION_SET::Set().
| BOOST_AUTO_TEST_CASE | ( | Ipc2581PadHoleMatchesNcDrill | ) |
Definition at line 369 of file test_ipc2581_export.cpp.
References actual, B_Cu, BOOST_AUTO_TEST_CASE(), BOOST_REQUIRE(), EnumerateDrillOperations(), expected, F_Cu, DRILL_QUERY::m_NonPlatedOnly, DRILL_QUERY::m_Span, PCB_IU_PER_MM, and PCB_PAD_T.
| BOOST_AUTO_TEST_CASE | ( | Ipc2581User10FeaturesHaveDeclaredLayer | ) |
Definition at line 428 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), name, and User_10.
| BOOST_AUTO_TEST_CASE | ( | Ipc2581VariantPropertySelectsPopulation | ) |
Definition at line 663 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), GenerateIpc2581File(), JOB_EXPORT_PCB_IPC2581::m_colInternalId, JOB_EXPORT_PCB_FAB::m_variantNames, KI_TEST::SCOPED_TEMP_DIR::Path(), reporter, and JOB::SetConfiguredOutputPath().
| BOOST_AUTO_TEST_CASE | ( | Ipc2581ViaProtectionUsesBoardDefaults | ) |
Definition at line 564 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), F_Cu, BOARD_DESIGN_SETTINGS::m_FillVias, BOARD_DESIGN_SETTINGS::m_TentViasBack, BOARD_DESIGN_SETTINGS::m_TentViasFront, name, PCB_VIA_T, and via.
| BOOST_AUTO_TEST_CASE | ( | IpcBackBlindDrillSpanUsesStackOrder | ) |
Definition at line 713 of file test_ipc2581_export.cpp.
References B_Cu, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), In2_Cu, PCB_VIA_T, and via.
| BOOST_AUTO_TEST_CASE | ( | IpcExportLeavesBoardStackupUntouched | ) |
Definition at line 759 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_STACKUP::GetCount(), BOARD_STACKUP::GetList(), and BOARD_DESIGN_SETTINGS::GetStackupDescriptor().
| BOOST_AUTO_TEST_CASE | ( | KnockoutTextMultiContour_Issue23968 | ) |
Test that knockout text with holes emits schema-valid XML (Issue #23968)
Knockout text renders as a filled polygon with each glyph contour becoming a separate outline. The IPC-2581 FeaturesType allows only one Feature child, so when a knockout text produces more than one Contour it must be wrapped in a UserSpecial (which itself is a Feature that may contain any number of child Features).
test_copper_graphics.kicad_pcb contains a knockout text "Otherwise" on B.Cu, whose 'O' glyph produces two contours (outer and inner), which reproduces the multi-contour case.
Definition at line 1460 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), and BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | MultiLayerFootprintGraphic_Issue24752 | ) |
Test that a multi-layer footprint graphic is emitted on every layer (Issue #24752).
An fp_poly on F.Cu + F.Mask used to export only on its primary layer (F.Cu). KiCad plots it on both, so the F.Mask copy must be present too.
Definition at line 1975 of file test_ipc2581_export.cpp.
References BOARD::Add(), FOOTPRINT::Add(), SHAPE_POLY_SET::Append(), BOOST_REQUIRE(), F_Cu, F_Mask, FOOTPRINT, LayerFeatureRegion(), KI_TEST::LoadStringData(), SHAPE_POLY_SET::NewOutline(), pcbIUScale, POLY, BOARD::SetCopperLayerCount(), EDA_SHAPE::SetFilled(), PCB_SHAPE::SetLayerSet(), PCB_SHAPE::SetPolyShape(), FOOTPRINT::SetPosition(), FOOTPRINT::SetReference(), PCB_SHAPE::SetStroke(), and SOLID.
| BOOST_AUTO_TEST_CASE | ( | NoClosedOutline_Issue25149 | ) |
A board with no closed outline must export without crashing and omit Profile (Issue #25149).
Definition at line 2129 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | NoSurfaceFinishExport | ) |
Test that boards without surface finish don't generate coating layers.
Definition at line 835 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), and BOARD_STACKUP::m_FinishType.
| BOOST_AUTO_TEST_CASE | ( | NpthMaskOnlyOpeningUsesAuthoredSize | ) |
Definition at line 2316 of file test_ipc2581_export.cpp.
References std::abs(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), circle(), F_Cu, F_Mask, NPTH, pad, pcbIUScale, and source.
| BOOST_AUTO_TEST_CASE | ( | ProcessLayerViaPads_Issue25149 | ) |
Process-layer via pads must sit in a Set at the via position (Issue #25149).
Definition at line 2151 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), LayerFeatureRegion(), and KI_TEST::LoadStringData().
| BOOST_AUTO_TEST_CASE | ( | RequiredSchemaCheckRejectsMissingXmllint | ) |
Definition at line 873 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), and KI_TEST::SCOPED_PROCESS_ENV_VAR::SetValue().
| BOOST_AUTO_TEST_CASE | ( | RoundRectMaskRadius_Issue24751 | ) |
Test that a roundrect pad's mask aperture shrinks its radius with its size (Issue #24751).
A roundrect pad with a negative mask margin has a smaller mask aperture, and its corner radius must shrink by the per-side margin too. The exporter used to reuse the copper radius, and the shape-dict key ignored the layer/expansion so the mask referenced the copper shape.
Definition at line 1926 of file test_ipc2581_export.cpp.
References BOARD::Add(), FOOTPRINT::Add(), PADSTACK::ALL_LAYERS, BOOST_REQUIRE(), F_Cu, F_Mask, FOOTPRINT, KI_TEST::LoadStringData(), PADSTACK::NORMAL, PAD, pad, pcbIUScale, ROUNDRECT, BOARD::SetCopperLayerCount(), FOOTPRINT::SetPosition(), FOOTPRINT::SetReference(), and SMD.
| BOOST_AUTO_TEST_CASE | ( | RoundUnequalDrillHasPadstackHole | ) |
Definition at line 2179 of file test_ipc2581_export.cpp.
References std::abs(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), CIRCLE, pad, and pcbIUScale.
| BOOST_AUTO_TEST_CASE | ( | SchemaValidation_Issue25149 | ) |
Validate the minimal boards attached to issue #25149 against the IPC-2581C schema.
Definition at line 2097 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), and BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | SchemaValidationRejectsInvalidDocument | ) |
Definition at line 897 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | SchemaValidationVersionB | ) |
Validate IPC-2581B export against schema for multiple boards.
This test exports each board in VALIDATION_TEST_BOARDS to IPC-2581B format and validates against the IPC-2581B1.xsd schema using xmllint (if available).
Definition at line 943 of file test_ipc2581_export.cpp.
References BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | SchemaValidationVersionC | ) |
Validate IPC-2581C export against schema for multiple boards.
This test exports each board in VALIDATION_TEST_BOARDS to IPC-2581C format and validates against the IPC-2581C.xsd schema using xmllint (if available).
Definition at line 975 of file test_ipc2581_export.cpp.
References BOOST_TEST_CONTEXT().
| BOOST_AUTO_TEST_CASE | ( | SecondaryDrillPostMachiningSpecs | ) |
Saved pad carries a front countersink and back counterbore.
Definition at line 1483 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), COUNTERBORE, COUNTERSINK, PAD::GetBackPostMachiningMode(), PAD::GetFrontPostMachiningMode(), FAB::SectionKeyString(), and ToDouble().
| BOOST_AUTO_TEST_CASE | ( | SlotCavityFullBoardSchema | ) |
Full pad_backdrill exports pass the B1 and C schemas including SlotCavity.
Definition at line 1628 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | SlotCavityUsesDrillPosition | ) |
Offset slot location is the drill center saved by pcbnew.
Definition at line 1588 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), IsDrillSlot(), location, pad, pcbIUScale, ToDouble(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | SlotPostMachiningSpecRefs | ) |
Definition at line 2252 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), COUNTERBORE, COUNTERSINK, PAD::GetBackPostMachiningMode(), PAD::GetFrontPostMachiningMode(), and IsDrillSlot().
| BOOST_AUTO_TEST_CASE | ( | SmdPadSolderMaskExport_Issue16658 | ) |
Pads with authored F.Mask layers emit IPC-2581 mask features Issue #16658.
Definition at line 1228 of file test_ipc2581_export.cpp.
References BOOST_REQUIRE(), F_Mask, pad, and SMD.
| BOOST_AUTO_TEST_CASE | ( | SolderMaskMarginExpandsMaskPrimitive_Issue24749 | ) |
Test that the per-layer solder mask margin expands the exported mask primitive (Issue #24749).
The standard-primitive cache was keyed on pad geometry alone, so the copper primitive (no expansion) processed first was reused verbatim for the mask layer, dropping the solder mask margin. A 1.0 mm circular pad with a 0.5 mm mask margin must therefore export a 2.0 mm mask circle, not a 1.0 mm one.
Definition at line 2030 of file test_ipc2581_export.cpp.
References std::abs(), BOARD::Add(), FOOTPRINT::Add(), PADSTACK::ALL_LAYERS, BOOST_REQUIRE(), CIRCLE, F_Cu, F_Mask, FOOTPRINT, PADSTACK::NORMAL, PAD, pad, pcbIUScale, FOOTPRINT::SetPosition(), FOOTPRINT::SetReference(), and SMD.
| BOOST_AUTO_TEST_CASE | ( | SurfaceFinishExport | ) |
Test that surface finish is exported correctly (Issue #22690)
This test verifies that when a board has a surface finish defined:
Definition at line 789 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and BOARD_STACKUP::m_FinishType.
| BOOST_AUTO_TEST_CASE | ( | TentedThermalViaPadsDoNotOpenMask | ) |
Definition at line 1295 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and LayerFeatureRegion().
| BOOST_AUTO_TEST_CASE | ( | TextBoxUsesDrawPosition | ) |
Test that text boxes use their calculated drawing position in IPC-2581 output.
Unlike ordinary text, PCB_TEXTBOX stores its anchor in the box geometry and overrides GetDrawPos() to calculate it. GetTextPos() is normally zero, so using it places the exported text at the board origin.
Definition at line 1177 of file test_ipc2581_export.cpp.
References BOARD::Add(), BOOST_REQUIRE(), F_SilkS, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_TOP, pcbIUScale, PCB_TEXTBOX::SetBorderEnabled(), PCB_SHAPE::SetEnd(), EDA_TEXT::SetHorizJustify(), PCB_SHAPE::SetLayer(), PCB_TEXTBOX::SetMarginLeft(), PCB_TEXTBOX::SetMarginTop(), PCB_SHAPE::SetStart(), EDA_TEXT::SetText(), PCB_TEXTBOX::SetTextSize(), PCB_TEXTBOX::SetTextThickness(), and EDA_TEXT::SetVertJustify().
| BOOST_AUTO_TEST_CASE | ( | XmllintFailureWithoutStderrIsReported | ) |
Definition at line 923 of file test_ipc2581_export.cpp.
References BOOST_CHECK_EQUAL().
|
static |
Extract the text of the first LayerFeature block for a given layer reference.
Returns an empty string when no such LayerFeature exists.
Definition at line 1278 of file test_ipc2581_export.cpp.
References end.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().