35#include <boost/algorithm/string.hpp>
36#include <boost/core/ignore_unused.hpp>
61 m_doc =
new TiXmlDocument(pFilename.string().c_str());
63 bool loadOkay =
m_doc->LoadFile();
66 "Failed to load test definition file: " + pFilename.string() +
67 "\n" +
string(
m_doc->ErrorDesc()));
74 boost::ignore_unused(pSrc);
80 TiXmlHandle handle(pDoc);
81 TiXmlElement *tmp, *testElement;
85 tmp = handle.FirstChildElement(
"tests").Element();
88 testElement = tmp->FirstChildElement(
"test");
92 testElement = handle.FirstChildElement(
"test").Element();
95 ASSERTL0(testElement,
"Cannot find 'test' or 'tests' root element.");
100 testElement = testElement->NextSiblingElement(
"test");
#define ASSERTL0(condition, msg)
The TestData class is responsible for parsing a test XML file and storing the data.
The TestData class is responsible for parsing a test XML file and storing the data.
TestFile(const fs::path &pFilename, po::variables_map &pVm)
TestData constructor.
std::vector< TestData * > m_tests
Vector of one or more tests to run.
po::variables_map m_cmdoptions
void Parse(TiXmlDocument *pDoc)
Parse the test file and populate member variables for the test.