|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <eda_item_test_utils.h>#include <core/typeinfo.h>#include <drc/drc_item.h>#include <board.h>#include <board_design_settings.h>#include <board_item.h>#include <footprint.h>#include <pad.h>#include <pcb_shape.h>#include <pcb_barcode.h>#include <pcb_text.h>#include <pcb_textbox.h>#include <pcb_drill_chart.h>#include <pcb_table.h>#include <pcb_tablecell.h>#include <pcb_reference_image.h>#include <zone.h>#include <pcb_track.h>#include <pcb_marker.h>#include <pcb_dimension.h>#include <pcb_point.h>#include <pcb_target.h>#include <pcb_group.h>#include <pcb_grid_item.h>#include <pcb_board_outline.h>#include <properties/property.h>#include <properties/property_mgr.h>Go to the source code of this file.
Classes | |
| class | TEST_BOARD_ITEM_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (Type) | |
| BOOST_AUTO_TEST_CASE (Move) | |
| BOOST_AUTO_TEST_CASE (Rotate) | |
| BOOST_AUTO_TEST_CASE (FlipLeftRight) | |
| BOOST_AUTO_TEST_CASE (FlipUpDown) | |
| static PCB_TABLE * | makeTable (BOARD &aBoard, const int aColWidths[2], const int aRowHeights[2], double aDegrees) |
| BOOST_AUTO_TEST_CASE (TableFlipSwapsTheChosenAxis) | |
| BOOST_AUTO_TEST_CASE (TableBoundingBoxCoversEveryCell) | |
| BOOST_AUTO_TEST_CASE (TextBoxBoundingBoxFollowsItsRotation) | |
| BOOST_AUTO_TEST_CASE (TableFlipTiltsTheWayEverythingElseDoes) | |
| BOOST_AUTO_TEST_CASE (Issue23234_CustomPadstackFlip) | |
| Regression test for issue #23234: Changing padstack mode to Custom on a flipped footprint's pad and pressing OK caused an "Unhandled exception" (std::out_of_range) because PADSTACK::CopperLayer( F_Cu ) fell through to m_copperProps.at( ALL_LAYERS ) after FlipLayers() had renamed the F_Cu key to B_Cu. | |
| BOOST_AUTO_TEST_CASE (Issue24696_SwapItemDataKeepsGroupMembership) | |
| BOOST_AUTO_TEST_CASE (RecordDRCExclusionsSkipsMarkerWithoutRCItem) | |
| BOOST_AUTO_TEST_CASE (ResolveItemIdentityCachePurgedOnDestruction) | |
| BOOST_AUTO_TEST_CASE (UncachedItemSurvivesBoardDestruction) | |
| BOOST_AUTO_TEST_CASE (IndexedItemSurvivesBoardDestruction) | |
| BOOST_AUTO_TEST_CASE | ( | FlipLeftRight | ) |
Definition at line 338 of file test_board_item.cpp.
References BOOST_TEST_CONTEXT(), IterateOverPositionsAndReferences(), and MAX_STRUCT_TYPE_ID.
| BOOST_AUTO_TEST_CASE | ( | FlipUpDown | ) |
Definition at line 373 of file test_board_item.cpp.
References BOOST_TEST_CONTEXT(), IterateOverPositionsAndReferences(), and MAX_STRUCT_TYPE_ID.
| BOOST_AUTO_TEST_CASE | ( | IndexedItemSurvivesBoardDestruction | ) |
Definition at line 755 of file test_board_item.cpp.
References BOARD::Add(), BOARD, BOOST_REQUIRE(), BOARD::CacheItemById(), FOOTPRINT, PAD, pad, and FOOTPRINT::Pads().
| BOOST_AUTO_TEST_CASE | ( | Issue23234_CustomPadstackFlip | ) |
Regression test for issue #23234: Changing padstack mode to Custom on a flipped footprint's pad and pressing OK caused an "Unhandled exception" (std::out_of_range) because PADSTACK::CopperLayer( F_Cu ) fell through to m_copperProps.at( ALL_LAYERS ) after FlipLayers() had renamed the F_Cu key to B_Cu.
Definition at line 631 of file test_board_item.cpp.
References PADSTACK::ALL_LAYERS, CIRCLE, PADSTACK::CUSTOM, F_Cu, PADSTACK::NORMAL, pad, BASE_SET::set(), SMD, and TOP_BOTTOM.
| BOOST_AUTO_TEST_CASE | ( | Issue24696_SwapItemDataKeepsGroupMembership | ) |
Definition at line 670 of file test_board_item.cpp.
References EDA_ITEM::GetParentGroup(), group, image, EDA_ITEM::SetParentGroup(), and BOARD_ITEM::SwapItemData().
| BOOST_AUTO_TEST_CASE | ( | Move | ) |
Definition at line 259 of file test_board_item.cpp.
References BOOST_TEST_CONTEXT(), IterateOverPositionsAndReferences(), and MAX_STRUCT_TYPE_ID.
| BOOST_AUTO_TEST_CASE | ( | RecordDRCExclusionsSkipsMarkerWithoutRCItem | ) |
Definition at line 694 of file test_board_item.cpp.
References BOARD::Add(), BOARD::GetDesignSettings(), BOARD_DESIGN_SETTINGS::m_DrcExclusions, BOARD::RecordDRCExclusions(), and MARKER_BASE::SetExcluded().
| BOOST_AUTO_TEST_CASE | ( | ResolveItemIdentityCachePurgedOnDestruction | ) |
Definition at line 709 of file test_board_item.cpp.
References BOARD::Add(), BOOST_REQUIRE(), BOARD::CacheItemById(), FOOTPRINT, BOARD::IsItemIndexedById(), PAD, pad, FOOTPRINT::Pads(), and BOARD::ResolveItem().
| BOOST_AUTO_TEST_CASE | ( | Rotate | ) |
Definition at line 297 of file test_board_item.cpp.
References BOOST_TEST_CONTEXT(), IterateOverPositionsAndReferences(), and MAX_STRUCT_TYPE_ID.
| BOOST_AUTO_TEST_CASE | ( | TableBoundingBoxCoversEveryCell | ) |
Definition at line 513 of file test_board_item.cpp.
References BOOST_TEST_CONTEXT(), BOX2< Vec >::Contains(), BOX2< Vec >::GetBottom(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), makeTable(), pcbIUScale, and table.
| BOOST_AUTO_TEST_CASE | ( | TableFlipSwapsTheChosenAxis | ) |
Definition at line 456 of file test_board_item.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), PCB_TABLE::GetCells(), BOX2< Vec >::GetCenter(), LEFT_RIGHT, makeTable(), BOX2< Vec >::Merge(), pcbIUScale, table, TOP_BOTTOM, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | TableFlipTiltsTheWayEverythingElseDoes | ) |
Definition at line 575 of file test_board_item.cpp.
References std::abs(), ANGLE_180, EDA_ANGLE::AsDegrees(), BOOST_TEST_CONTEXT(), DEGREES_T, LEFT_RIGHT, makeTable(), pcbIUScale, table, and TOP_BOTTOM.
| BOOST_AUTO_TEST_CASE | ( | TextBoxBoundingBoxFollowsItsRotation | ) |
Definition at line 543 of file test_board_item.cpp.
References BOOST_TEST_CONTEXT(), BOX2< Vec >::Contains(), DEGREES_T, F_SilkS, BOX2< Vec >::GetBottom(), PCB_TEXTBOX::GetBoundingBox(), PCB_TEXTBOX::GetCorners(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), pcbIUScale, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), PCB_SHAPE::SetStart(), and PCB_TEXTBOX::SetTextAngle().
| BOOST_AUTO_TEST_CASE | ( | Type | ) |
Definition at line 240 of file test_board_item.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_TEST_CONTEXT(), ENUM_MAP< T >::Instance(), and MAX_STRUCT_TYPE_ID.
| BOOST_AUTO_TEST_CASE | ( | UncachedItemSurvivesBoardDestruction | ) |
Definition at line 739 of file test_board_item.cpp.
References BOARD, BOOST_REQUIRE(), and dummy.
|
static |
Definition at line 410 of file test_board_item.cpp.
References BOARD::Add(), DEGREES_T, F_SilkS, pcbIUScale, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), EDA_TEXT::SetText(), and table.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().