32std::unique_ptr<BOARD> loadBoard(
const std::string& aName )
46 std::unique_ptr<BOARD> twoLayer = loadBoard(
"issue17559.kicad_pcb" );
47 std::unique_ptr<BOARD> fourLayer = loadBoard(
"issue22536.kicad_pcb" );
61 std::unique_ptr<BOARD> twoLayer = loadBoard(
"issue17559.kicad_pcb" );
62 std::unique_ptr<BOARD> fourLayer = loadBoard(
"issue22536.kicad_pcb" );
66 nlohmann::json legacy;
72 legacy.erase(
"all_copper_layers" );
78 twoLayer->GetEnabledLayers(),
true )
General utilities for PCB file IO for QA programs.
std::string FmtHex() const
Return a hex string showing contents of this set.
LSEQ ResolvePlotLayers(const LSET &aEnabledLayers) const
Return the layers to plot on a board with aEnabledLayers.
void FromJson(const nlohmann::json &aJson) override
virtual void ToJson(nlohmann::json &j) const
LSET is a set of PCB_LAYER_IDs.
static const LSET & AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
LSEQ SeqStackupForPlotting() const
Return the sequence that is typical for a bottom-to-top stack-up.
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static LSET DialogLayerSelection(const LSET &aChecked, const LSET &aEnabledLayers, bool aForJob)
Return the layers a plot dialog stores when aChecked are ticked.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
std::unique_ptr< BOARD > ReadBoardFromFileOrStream(const std::string &aFilename, std::istream &aFallback)
Read a board from a file, or another stream, as appropriate.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE_EQUAL(rows.size(), 1)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(JobDialogKeepsOnlyShownLayers)