summaryrefslogtreecommitdiff
path: root/include/cppunit/TestFailure.h
diff options
context:
space:
mode:
authorSteve M. Robbins <smr@sumost.ca>2001-07-15 03:18:06 +0000
committerSteve M. Robbins <smr@sumost.ca>2001-07-15 03:18:06 +0000
commit08b4a5c444044db09dc5c668390e9f40663210ff (patch)
treef94c3f33864a238e3edc29c6fc92ebff748e82fa /include/cppunit/TestFailure.h
parent8cdfc19f2213bf1de4aee4bc5e799af49b6608d0 (diff)
downloadcppunit-08b4a5c444044db09dc5c668390e9f40663210ff.tar.gz
Added documentation.
Diffstat (limited to 'include/cppunit/TestFailure.h')
-rw-r--r--include/cppunit/TestFailure.h70
1 files changed, 33 insertions, 37 deletions
diff --git a/include/cppunit/TestFailure.h b/include/cppunit/TestFailure.h
index f8dae91..bb2c226 100644
--- a/include/cppunit/TestFailure.h
+++ b/include/cppunit/TestFailure.h
@@ -1,56 +1,52 @@
-#ifndef CPPUNIT_TESTFAILURE_H
+#ifndef CPPUNIT_TESTFAILURE_H // -*- C++ -*-
#define CPPUNIT_TESTFAILURE_H
#include <string>
namespace CppUnit {
- class Test;
- class Exception;
+class Test;
+class Exception;
- /**
- * A TestFailure collects a failed test together with
- * the caught exception.
- *
- * TestFailure assumes lifetime control for any exception
- * passed to it. The lifetime of tests is handled by
- * their TestSuite (if they have been added to one) or
- * whomever creates them.
- *
- * see TestResult
- * see TestSuite
- *
- */
- class TestFailure
- {
- public:
- TestFailure (Test *failedTest, Exception *thrownException);
- ~TestFailure ();
+/*! \brief Record of a failed test execution.
+ *
+ * A TestFailure collects a failed test together with
+ * the caught exception.
+ *
+ * TestFailure assumes lifetime control for any exception
+ * passed to it.
+ */
+class TestFailure
+{
+public:
+ TestFailure (Test *failedTest, Exception *thrownException);
+ ~TestFailure ();
- Test* failedTest ();
+ Test* failedTest ();
- Exception* thrownException ();
+ Exception* thrownException ();
+
+ std::string toString () const;
- std::string toString () const;
+protected:
+ Test *m_failedTest;
+ Exception *m_thrownException;
- protected:
- Test *m_failedTest;
- Exception *m_thrownException;
+private:
+ TestFailure (const TestFailure& other);
+ TestFailure& operator= (const TestFailure& other);
+};
- private:
- TestFailure (const TestFailure& other);
- TestFailure& operator= (const TestFailure& other);
- };
+/// Gets the failed test.
+inline Test *TestFailure::failedTest ()
+{ return m_failedTest; }
- /// Gets the failed test.
- inline Test *TestFailure::failedTest ()
- { return m_failedTest; }
+/// Gets the thrown exception.
+inline Exception *TestFailure::thrownException ()
+{ return m_thrownException; }
- /// Gets the thrown exception.
- inline Exception *TestFailure::thrownException ()
- { return m_thrownException; }
} // namespace CppUnit