25#include <boost/test/data/test_case.hpp>
37struct FPLIB_LOAD_FP_TEST_CASE
40 wxString m_libraryPath;
43 std::optional<unsigned> m_expectedFootprintVersion;
46 std::optional<unsigned> m_expectedPadCount;
49 friend std::ostream&
operator<<( std::ostream& os,
const FPLIB_LOAD_FP_TEST_CASE& aTestCase )
51 os << aTestCase.m_fpName;
57const std::vector<FPLIB_LOAD_FP_TEST_CASE> FpLibLoadSave_testCases{
59 "plugins/kicad_sexpr/fp.pretty",
79 const auto doFootprintTest = [&](
const FOOTPRINT& aBoard )
81 if( testCase.m_expectedPadCount )
88 doFootprintTest, testCase.m_expectedFootprintVersion );
General utilities for PCB file IO for QA programs.
std::ostream & operator<<(std::ostream &aStream, const EDA_TEXT &aText)
void LoadAndTestFootprintFile(const wxString &aLibRelativePath, const wxString &aFpName, bool aRoundtrip, std::function< void(FOOTPRINT &)> aFootprintTestFunction, std::optional< int > aExpectedFootprintVersion)
Same as LoadAndTestBoardFile, but for footprints.
BOOST_CHECK_EQUAL(ret, c.m_exp_result)
BOOST_DATA_TEST_CASE(FpLibLoadSave, boost::unit_test::data::make(FpLibLoadSave_testCases), testCase)
Simple tests cases that run though the given FPs and checks some simple properties.