91 static std::unique_ptr<BOARD_EXPECTATION_TEST>
CreateFromJson(
const std::string& aBrdName,
92 const nlohmann::json& aBrdExpectations );
107 static void RunFromRef(
const std::string& aBrdName,
const BOARD& aBoard,
Information pertinent to a Pcbnew printed circuit board.
BOARD_EXPECTATION_TEST(const std::string &aBrdName)
static std::unique_ptr< BOARD_EXPECTATION_TEST > CreateFromJson(const std::string &aBrdName, const nlohmann::json &aBrdExpectations)
static std::vector< DESCRIPTOR > ExtractExpectationTestsFromJson(const nlohmann::json &aExpectationArray)
Extracts expectation tests from the given JSON array and returns a list of test references that can b...
void RunTest(const BOARD &aBrd) const
Runs the test against the given board.
std::unique_ptr< BOARD_EXPECTATION > m_expectation
static void RunFromRef(const std::string &aBrdName, const BOARD &aBoard, const BOARD_EXPECTATION_TEST::DESCRIPTOR &aExpectationTestRef)
Constructs a BOARD_EXPECTATION_TEST from the given JSON definition, and runs it on the given board.
A single expectation about a board, which can be run as a test against a parsed BOARD.
virtual std::string GetName() const =0
void SetComment(std::string aComment)
Set a comment to be included in the test output for this expectation, which can be used to provide mo...
const std::string & GetComment() const
virtual void RunTest(const BOARD &aBrd) const =0
virtual ~BOARD_EXPECTATION()=default
Lightweight descriptor for a BOARD_EXPECTATION_TEST, which can be used to refer to the test unambiguo...
std::string m_TestName
If the test has a name, it's that, else an index - this is for naming the test for filtering.
const nlohmann::json & m_TestJson
Handy ref to the JSON entry for this expectations test, which saves looking it up again.
std::vector< std::string > m_Tags
Tags associated with the test, which can be used for filtering.