4 #include "xmlrpc-c/girerr.hpp"
12 testSuite::~testSuite() {
18 testSuite::run(unsigned int const indentation) {
20 cout << string(indentation*2, ' ')
21 << "Running " << suiteName() << endl;
22 this->runtests(indentation);
23 } catch (error const& error) {
24 throwf("%s failed. %s", suiteName().c_str(), error.what());
26 throw(error(suiteName() + string(" failed. ") +
27 string("It threw an unexpected type of object")));
29 cout << string(indentation*2, ' ')
30 << suiteName() << " tests passed." << endl;
35 // This is a good place to set a breakpoint.
37 logFailedTest(const char * const fileName,
38 unsigned int const lineNum,
39 const char * const statement) {
44 << fileName << ":" << lineNum
45 << ": expected (" << statement << ")" << endl;
47 throw(error(msg.str()));
52 fileLineError(string const filename,
53 unsigned int const lineNumber,
54 string const description) {
56 ostringstream combined;
58 combined << filename << ":" << lineNumber << " " << description;
60 return error(combined.str());