XMLBuilder& XMLTestListenerImpl:: createTestCaseElem(const TestCaseInfoReader* testcase) { return testSuiteElement->element("testcase") .attribute("name", testcase->getName()) .attribute("fixture", testcase->getNameOfFixture()) .attribute("time", toValStr(0)) .attribute("filename", testcase->getFileName()); }
void XMLTestListenerImpl:: endTestSuite(TestSuiteInfoReader* suite) { testSuiteElement->attribute("name", suite->getName()) .attribute("tests", toValStr(testSuiteResultReporter->getNumberOfTestCases(suite))) .attribute("fixtures", toValStr(testSuiteResultReporter->getNumberOfFixtures(suite))) .attribute("crashes", toValStr(testSuiteResultReporter->getNumberOfCrashedTestCases(suite))) .attribute("skips", toValStr(testSuiteResultReporter->getNumberOfSkippedTestCases(suite))) .attribute("errors", toValStr(testSuiteResultReporter->getNumberOfErrorTestCases(suite))) .attribute("failures", toValStr(testSuiteResultReporter->getNumberOfFailedTestCases(suite))); }
std::string toString(long double d) { return toValStr(d); }
std::string toString(double f) { return toValStr(f); }
std::string toString(float f) { return toValStr(f); }
std::string toString(unsigned long l) { return toValStr(l); }
std::string toString(long l) { return toValStr(l); }
std::string toString(unsigned int i) { return toValStr(i); }
std::string toString(int i) { return toValStr(i); }
std::string toString(unsigned short s) { return toValStr(s); }
std::string toString(short s) { return toValStr(s); }
std::string toString(unsigned char c) { return toValStr(c); }
std::string toString(char c) { return toValStr(c); }
std::string toHexAndDecStr(T val) { oss_t oss; oss << toHexStr(val) << "/" << toValStr(val); return oss.str(); }
std::string toValStr(unsigned char val) { return toValStr((unsigned int)val); }
std::string toValStr(char val) { return toValStr((int)val); }