|
KiCad PCB EDA Suite
|
Test suite for import of Eagle *.brd board files. More...
#include <pcbnew_utils/board_test_utils.h>#include <pcbnew_utils/board_file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew/pcb_io/eagle/pcb_io_eagle.h>#include <board.h>#include <footprint.h>#include <netinfo.h>#include <pcb_text.h>#include <pcb_track.h>#include <map>#include <wx/filename.h>Go to the source code of this file.
Classes | |
| struct | EAGLE_BOARD_IMPORT_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (ViaNetAssignment) | |
| Verify that vias imported from an Eagle board are assigned to the correct nets. | |
| BOOST_AUTO_TEST_CASE (TextJustification) | |
| Verify that text justification is correct after importing an Eagle board with rotated footprints and silkscreen text annotations. | |
Test suite for import of Eagle *.brd board files.
Definition in file test_eagle_board_import.cpp.
| BOOST_AUTO_TEST_CASE | ( | TextJustification | ) |
Verify that text justification is correct after importing an Eagle board with rotated footprints and silkscreen text annotations.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23016
The test board has 4-pin connectors (I2C0, I2C1) rotated R90 with pin label text "G SDA SCL V+" on the top silkscreen. A bug in orientFPText() had dead code (abs(degrees) <= -180, which can never be true) that prevented text justification from being flipped for footprints rotated 180 or 270 degrees. The board also exercises the layer enable fix by having unmapped Eagle layers (53, 54, 100+) whose sentinel values previously caused std::bad_alloc in LSET::set().
Definition at line 140 of file test_eagle_board_import.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), DEGREES_T, F_SilkS, EDA_TEXT::GetHorizJustify(), KI_TEST::GetPcbnewTestDataDir(), EDA_TEXT::GetVertJustify(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_TOP, PCB_IO_EAGLE::LoadBoard(), PCB_TEXT_T, text, IO_ERROR::What(), and IO_ERROR::what().
| BOOST_AUTO_TEST_CASE | ( | ViaNetAssignment | ) |
Verify that vias imported from an Eagle board are assigned to the correct nets.
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/21243 and https://gitlab.com/kicad/code/kicad/-/issues/23016
The Adafruit AHT20 board has vias on SDA, SCL, GND, VCC, and VDD nets. A previous bug caused netCode to not increment for signals with only polygons (no pads), which shifted all subsequent net assignments.
Definition at line 64 of file test_eagle_board_import.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), NETINFO_ITEM::GetNetname(), KI_TEST::GetPcbnewTestDataDir(), PCB_IO_EAGLE::LoadBoard(), PCB_VIA_T, IO_ERROR::What(), and IO_ERROR::what().