|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <boost/test/data/test_case.hpp>#include <pcbnew_utils/board_test_utils.h>#include <board.h>#include <board_design_settings.h>#include <pad.h>#include <pcb_track.h>#include <footprint.h>#include <zone.h>#include <drc/drc_item.h>#include <settings/settings_manager.h>#include <geometry/shape_poly_set.h>#include <advanced_config.h>Go to the source code of this file.
Classes | |
| struct | ZONE_FILL_TEST_FIXTURE |
Functions | |
| BOOST_FIXTURE_TEST_CASE (BasicZoneFills, ZONE_FILL_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (NotchedZones, ZONE_FILL_TEST_FIXTURE) | |
| BOOST_DATA_TEST_CASE_F (ZONE_FILL_TEST_FIXTURE, RegressionZoneFillTests, boost::unit_test::data::make(RegressionZoneFillTests_tests), relPath) | |
| BOOST_DATA_TEST_CASE_F (ZONE_FILL_TEST_FIXTURE, RegressionSliverZoneFillTests, boost::unit_test::data::make(RegressionSliverZoneFillTests_tests), relPath) | |
| BOOST_DATA_TEST_CASE_F (ZONE_FILL_TEST_FIXTURE, RegressionTeardropFill, boost::unit_test::data::make(RegressionTeardropFill_tests), test) | |
| BOOST_FIXTURE_TEST_CASE (RegressionNetTie, ZONE_FILL_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RegressionZonePriorityIsolatedIslands, ZONE_FILL_TEST_FIXTURE) | |
| Test for issue 21746: Lower priority zones should fill areas where higher priority zones have isolated islands that get removed. | |
| BOOST_FIXTURE_TEST_CASE (RegressionViaFlashingUnreachableZone, ZONE_FILL_TEST_FIXTURE) | |
| Test for issue 22010: Via annular rings should not appear on zone layers when the zone fill doesn't actually reach the via. | |
| BOOST_FIXTURE_TEST_CASE (RegressionViaZoneNetShort, ZONE_FILL_TEST_FIXTURE) | |
| Test for issue 12964: Vias with remove_unused_layers should not flash on layers where they would short to a zone with a different net. | |
Variables | |
| int | delta = KiROUND( 0.006 * pcbIUScale.IU_PER_MM ) |
| static const std::vector< wxString > | RegressionZoneFillTests_tests |
| static const std::vector< wxString > | RegressionSliverZoneFillTests_tests |
| static const std::vector< std::pair< wxString, int > > | RegressionTeardropFill_tests |
| BOOST_DATA_TEST_CASE_F | ( | ZONE_FILL_TEST_FIXTURE | , |
| RegressionSliverZoneFillTests | , | ||
| boost::unit_test::data::make(RegressionSliverZoneFillTests_tests) | , | ||
| relPath | ) |
Definition at line 236 of file test_zone_filler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), DRCE_COPPER_SLIVER, KI_TEST::FillZones(), INCH, KI_TEST::LoadBoard(), BOARD_DESIGN_SETTINGS::m_DRCEngine, MM, pcbIUScale, RegressionSliverZoneFillTests_tests, RPT_SEVERITY_ERROR, DRC_ENGINE::RunTests(), and DRC_ENGINE::SetViolationHandler().
| BOOST_DATA_TEST_CASE_F | ( | ZONE_FILL_TEST_FIXTURE | , |
| RegressionTeardropFill | , | ||
| boost::unit_test::data::make(RegressionTeardropFill_tests) | , | ||
| test | ) |
Definition at line 283 of file test_zone_filler.cpp.
References KI_TEST::FillZones(), KI_TEST::LoadBoard(), and RegressionTeardropFill_tests.
| BOOST_DATA_TEST_CASE_F | ( | ZONE_FILL_TEST_FIXTURE | , |
| RegressionZoneFillTests | , | ||
| boost::unit_test::data::make(RegressionZoneFillTests_tests) | , | ||
| relPath | ) |
Definition at line 190 of file test_zone_filler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), DRCE_CLEARANCE, KI_TEST::FillZones(), INCH, KI_TEST::LoadBoard(), BOARD_DESIGN_SETTINGS::m_DRCEngine, MM, pcbIUScale, RegressionZoneFillTests_tests, RPT_SEVERITY_ERROR, DRC_ENGINE::RunTests(), and DRC_ENGINE::SetViolationHandler().
| BOOST_FIXTURE_TEST_CASE | ( | BasicZoneFills | , |
| ZONE_FILL_TEST_FIXTURE | ) |
Definition at line 53 of file test_zone_filler.cpp.
References PADSTACK::ALL_LAYERS, BOOST_CHECK_EQUAL(), delta, DRCE_CLEARANCE, KI_TEST::FillZones(), PAD::GetNumber(), DRC_ENGINE::InitEngine(), KI_TEST::LoadBoard(), BOARD_DESIGN_SETTINGS::m_DRCEngine, EDA_ITEM::m_Uuid, MM, pad, PCB_ARC_T, DRC_ENGINE::RunTests(), and DRC_ENGINE::SetViolationHandler().
| BOOST_FIXTURE_TEST_CASE | ( | NotchedZones | , |
| ZONE_FILL_TEST_FIXTURE | ) |
Definition at line 146 of file test_zone_filler.cpp.
References SHAPE_POLY_SET::BooleanAdd(), BOOST_CHECK_EQUAL(), F_Cu, KI_TEST::FillZones(), KI_TEST::LoadBoard(), and SHAPE_POLY_SET::OutlineCount().
| BOOST_FIXTURE_TEST_CASE | ( | RegressionNetTie | , |
| ZONE_FILL_TEST_FIXTURE | ) |
Definition at line 309 of file test_zone_filler.cpp.
References clearance, KI_TEST::FillZones(), KI_TEST::LoadBoard(), and pad.
| BOOST_FIXTURE_TEST_CASE | ( | RegressionViaFlashingUnreachableZone | , |
| ZONE_FILL_TEST_FIXTURE | ) |
Test for issue 22010: Via annular rings should not appear on zone layers when the zone fill doesn't actually reach the via.
The test board has:
Before the fix, vias within the zone outline would flash even if the zone fill didn't reach them due to obstacles (tracks). This caused false DRC violations for clearances and blocked dense routing near the vias.
Definition at line 432 of file test_zone_filler.cpp.
References BOOST_TEST_MESSAGE(), KI_TEST::FillZones(), KI_TEST::LoadBoard(), PCB_VIA_T, and via.
| BOOST_FIXTURE_TEST_CASE | ( | RegressionViaZoneNetShort | , |
| ZONE_FILL_TEST_FIXTURE | ) |
Test for issue 12964: Vias with remove_unused_layers should not flash on layers where they would short to a zone with a different net.
The test board has:
After zone fill, the vias should NOT flash on F.Cu in areas covered by the +3.3V zone, as that would short GND to +3.3V.
Definition at line 529 of file test_zone_filler.cpp.
References BOOST_TEST_MESSAGE(), KI_TEST::FillZones(), KI_TEST::LoadBoard(), PCB_VIA_T, via, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_FIXTURE_TEST_CASE | ( | RegressionZonePriorityIsolatedIslands | , |
| ZONE_FILL_TEST_FIXTURE | ) |
Test for issue 21746: Lower priority zones should fill areas where higher priority zones have isolated islands that get removed.
The test board has:
The VDD zone only connects to a small area, creating an isolated island that should be removed. The GND zone should then fill that area.
With the bug, GND is knocked out by VDD before VDD's isolated island is removed, leaving GND mostly empty.
Definition at line 359 of file test_zone_filler.cpp.
References SHAPE_LINE_CHAIN::Area(), BOOST_TEST_MESSAGE(), ZONE::CalculateFilledArea(), KI_TEST::FillZones(), ADVANCED_CFG::GetCfg(), ZONE::GetFilledArea(), KI_TEST::LoadBoard(), ADVANCED_CFG::m_ZoneFillIterativeRefill, SHAPE_POLY_SET::Outline(), and SHAPE_POLY_SET::OutlineCount().
| int delta = KiROUND( 0.006 * pcbIUScale.IU_PER_MM ) |
Definition at line 50 of file test_zone_filler.cpp.
Referenced by SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SCH_MOVE_TOOL::AlignToGrid(), EC_PERPLINE::Apply(), PNS::ApproximateSegmentAsRect(), PDF_PLOTTER::arcPath(), arcPts(), BezierToPolyline(), BOOST_FIXTURE_TEST_CASE(), PNS::DP_GATEWAYS::buildDpContinuation(), PCB_IO_KICAD_SEXPR_PARSER::checkpoint(), CircleToEndSegmentDeltaRadius(), LENGTH_DELAY_CALCULATION::clipLineToPad(), Collide(), Collide(), Collide(), Collide(), Collide(), SHAPE_POLY_SET::CollideVertex(), commitSnapshotWithLock(), SCH_LINE_WIRE_BUS_TOOL::computeBreakPoint(), COUPLED_MICROSTRIP::conductor_losses(), MICROSTRIP::conductor_losses(), ConnectBoardShapes(), ConvertArcToPolyline(), GERBER_DRAW_ITEM::ConvertSegmentToPolygon(), AM_PRIMITIVE::ConvertShapeToPolygon(), D_CODE::ConvertShapeToPolygon(), PNS::coupledBypass(), BOARD_ADAPTER::createArcSegments(), EXCELLON_WRITER::createDrillFile(), ALIGN_DISTRIBUTE_TOOL::doDistributeCenters(), ALIGN_DISTRIBUTE_TOOL::doDistributeGaps(), SCH_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawDimension(), D_CODE::DrawFlashedShape(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), DrawHalfOpenCylinder(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineDashed(), editArcEndpointKeepTangent(), fillArcGBRITEM(), PSLIKE_PLOTTER::FlashPadOval(), PCB_IO_KICAD_SEXPR::format(), RENDER_3D_OPENGL::generate3dGrid(), RENDER_3D_OPENGL::generateDimple(), RENDER_3D_OPENGL::generateDisk(), RENDER_3D_OPENGL::generateRing(), KIBIS_MODEL::generateSquareWave(), PCB_DIM_ALIGNED::GetAngle(), SCH_NO_CONNECT::GetBoundingBox(), GetDeltasForDistributeByGaps(), GetDeltasForDistributeByPoints(), KIGIT_COMMON::GetDifferentFiles(), SNAP_LINE_MANAGER::GetNearestSnapLinePoint(), BOARD::GetPad(), SCH_FIELD::GetRenderCache(), GERBER_DRAW_ITEM::GetTextD_CodePrms(), PAD::HitTest(), PAD::HitTest(), SCH_NO_CONNECT::HitTest(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_MOVE_TOOL::initializeMoveOperation(), CYLINDER::Intersect(), CYLINDER::IntersectP(), BOX2< VECTOR2I >::Intersects(), BEZIER_POLY::isFlat(), PNS::IsSegment45Degree(), CADSTAR_SCH_ARCHIVE_LOADER::loadLibPart(), PCB_IO_EAGLE::loadPlain(), PCB_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), SCH_SELECTION_TOOL::Main(), DSN::SPECCTRA_DB::makePADSTACK(), TRANSFORM::MapAngles(), MapAnglesV6(), SCH_DIRECTIVE_LABEL::MirrorHorizontally(), SCH_LABEL_BASE::MirrorHorizontally(), SCH_DIRECTIVE_LABEL::MirrorSpinStyle(), SCH_LABEL_BASE::MirrorSpinStyle(), SCH_DIRECTIVE_LABEL::MirrorVertically(), SCH_LABEL_BASE::MirrorVertically(), mpInfoLayer::Move(), PNS::HOLE::Move(), SCH_ALIGN_TOOL::moveItem(), SCH_MOVE_TOOL::moveItem(), NearestPoints(), SCH_TEXT::NormalizeJustification(), DIALOG_SHIM::OnCharHook(), KIGFX::WX_VIEW_CONTROLS::onMotion(), KIGFX::WX_VIEW_CONTROLS::onScroll(), PCB_POINT_EDITOR::OnSelectionChange(), KIGFX::WX_VIEW_CONTROLS::onWheel(), PCB_IO_EAGLE::packageCircle(), PCB_IO_EAGLE::packagePolygon(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_PARSER::ParseContour(), GPCB_FPL_CACHE::parseFOOTPRINT(), EASYEDA_PARSER_BASE::ParseLineChains(), PCB_IO_KICAD_SEXPR_PARSER::parsePAD(), PCB_IO_KICAD_SEXPR_PARSER::parsePadstack(), PCB_IO_EASYEDAPRO_PARSER::ParsePoly(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), DRAWING_TOOL::PlaceImportedGraphics(), SCH_NO_CONNECT::Plot(), PLOTTER::polyArc(), SCH_SHEET_PIN::Rotate(), CURSOR::SetCoordX(), SCH_LINE::SetLength(), PNS::SOLID::SetPos(), FOOTPRINT::SetPosition(), PCB_BARCODE::SetPosition(), PCB_GROUP::SetPosition(), SCH_GROUP::SetPosition(), SCH_SHEET::SetPositionIgnoringPins(), PCB_BARCODE::SetRect(), KIGFX::VIEW::SetScale(), PCB_TEXTBOX::SetTextAngle(), GRID_HELPER::SnapToConstructionLines(), COUPLED_STRIPLINE::Synthesize(), TestSegmentHit(), BEZIER_POLY::thirdControlPointDeviation(), KIGFX::COLOR4D::ToHSV(), DIALOG_PAD_PROPERTIES::transferDataToPad(), TransformCircleToPolygon(), TransformCircleToPolygon(), TransformOvalToPolygon(), PAD::TransformShapeToPolygon(), SETTINGS_MANAGER::TriggerBackupIfNeeded(), DIM_LEADER_POINT_EDIT_BEHAVIOR::UpdateItem(), SHAPE_GROUP_POINT_EDIT_BEHAVIOR::UpdateItem(), BOARD_INSPECTION_TOOL::UpdateLocalRatsnest(), and PCB_PROPERTIES_PANEL::valueChanged().
|
static |
Definition at line 231 of file test_zone_filler.cpp.
Referenced by BOOST_DATA_TEST_CASE_F().
|
static |
Definition at line 278 of file test_zone_filler.cpp.
Referenced by BOOST_DATA_TEST_CASE_F().
|
static |
Definition at line 172 of file test_zone_filler.cpp.
Referenced by BOOST_DATA_TEST_CASE_F().