25#include <boost/test/data/test_case.hpp> 
   37struct REFERENCE_IMAGE_LOAD_TEST_FIXTURE
 
   39    REFERENCE_IMAGE_LOAD_TEST_FIXTURE() {}
 
   43struct REFERENCE_IMAGE_LOAD_TEST_CASE
 
   48    bool     m_expectedLocked;
 
   50    double   m_expectedScale;
 
   59    std::vector<REFERENCE_IMAGE_LOAD_TEST_CASE> m_imageCases;
 
   62const std::vector<REFERENCE_IMAGE_LOAD_BOARD_TEST_CASE> ReferenceImageLoading_testCases{
 
   64            "reference_images_load_save",
 
   69                            "7dde345e-020a-4fdd-af77-588b452be5e0",
 
   76                            "e4fd52dd-1d89-4c43-b621-aebfc9788d5c",
 
   83                            "d402397e-bce0-4cae-a398-b5aeef397e87",
 
   97                        boost::unit_test::data::make( ReferenceImageLoading_testCases ), testCase )
 
   99    const auto doBoardTest = [&]( 
const BOARD& aBoard )
 
  101        for( 
const REFERENCE_IMAGE_LOAD_TEST_CASE& imageTestCase : testCase.m_imageCases )
 
  104                    "Checking for image with UUID: " << imageTestCase.m_imageUuid.
AsString() );
 
  113            BOOST_CHECK_CLOSE( refImage.
GetImageScale(), imageTestCase.m_expectedScale, 1e-6 );
 
  122                                   testCase.m_ExpectedBoardVersion );
 
 
General utilities for PCB file IO for QA programs.
 
This class handle bitmap images in KiCad.
 
VECTOR2I GetSizePixels() const
 
Information pertinent to a Pcbnew printed circuit board.
 
wxString AsString() const
 
Object to handle a bitmap image that can be inserted in a PCB.
 
A REFERENCE_IMAGE is a wrapper around a BITMAP_IMAGE that is displayed in an editor as a reference fo...
 
const BITMAP_BASE & GetImage() const
Get the underlying image.
 
double GetImageScale() const
 
void LoadAndTestBoardFile(const wxString aRelativePath, bool aRoundtrip, std::function< void(BOARD &)> aBoardTestFunction, std::optional< int > aExpectedBoardVersion)
Perform "some test" on a board file loaded from the path, then optionally save and reload and run the...
 
BOARD_ITEM & RequireBoardItemWithTypeAndId(const BOARD &aBoard, KICAD_T aItemType, const KIID &aID)
Get an item from the given board with a certain type and UUID.
 
BOOST_DATA_TEST_CASE_F(REFERENCE_IMAGE_LOAD_TEST_FIXTURE, ReferenceImageLoading, boost::unit_test::data::make(ReferenceImageLoading_testCases), testCase)
 
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
 
BOOST_CHECK_EQUAL(result, "25.4")
 
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
 
VECTOR2< int32_t > VECTOR2I