KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_step_and_repeat.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <wx/filefn.h>
#include <wx/filename.h>
#include <gerber_file_image.h>
#include <gerber_draw_item.h>
#include <qa_utils/wx_utils/unit_test_utils.h>

Go to the source code of this file.

Functions

static std::string GetGerbviewTestDataDir ()
 
 BOOST_AUTO_TEST_CASE (BlockReplication)
 Verifies that an SR block replicates all items as a unit rather than replicating each item individually.
 
 BOOST_AUTO_TEST_CASE (NoStepAndRepeat)
 Verifies that files without SR blocks still load correctly (no regression).
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( BlockReplication )

Verifies that an SR block replicates all items as a unit rather than replicating each item individually.

The test file has SRX3Y1I10.0J5.0*% with two region items (one LPD, one LPC) followed by SR*%. With block-level replication, each copy of the block must contain items in the same order (positive then negative). Individual item replication would interleave copies incorrectly.

Definition at line 54 of file test_step_and_repeat.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), copy, GetGerbviewTestDataDir(), image, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( NoStepAndRepeat )

Verifies that files without SR blocks still load correctly (no regression).

Definition at line 114 of file test_step_and_repeat.cpp.

References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), image, and path.

◆ GetGerbviewTestDataDir()

static std::string GetGerbviewTestDataDir ( )
static

Definition at line 34 of file test_step_and_repeat.cpp.

References KI_TEST::GetTestDataRootDir().

Referenced by BOOST_AUTO_TEST_CASE().