summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /3rdParty/CppUnit/cppunit/AdditionalMessage.h
downloadswift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to '3rdParty/CppUnit/cppunit/AdditionalMessage.h')
-rw-r--r--3rdParty/CppUnit/cppunit/AdditionalMessage.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/3rdParty/CppUnit/cppunit/AdditionalMessage.h b/3rdParty/CppUnit/cppunit/AdditionalMessage.h
new file mode 100644
index 0000000..917d754
--- /dev/null
+++ b/3rdParty/CppUnit/cppunit/AdditionalMessage.h
@@ -0,0 +1,76 @@
+#ifndef CPPUNIT_ADDITIONALMESSAGE_H
+#define CPPUNIT_ADDITIONALMESSAGE_H
+
+#include <cppunit/Message.h>
+
+
+CPPUNIT_NS_BEGIN
+
+
+/*! \brief An additional Message for assertions.
+ * \ingroup CreatingNewAssertions
+ *
+ * Provides a implicit constructor that takes a single string. This allow this
+ * class to be used as the message arguments in macros.
+ *
+ * The constructed object is either a Message with a single detail string if
+ * a string was passed to the macro, or a copy of the Message passed to the macro.
+ *
+ * Here is an example of usage:
+ * \code
+ *
+ * void checkStringEquals( const std::string &expected,
+ * const std::string &actual,
+ * const CppUnit::SourceLine &sourceLine,
+ * const CppUnit::AdditionalMessage &message );
+ *
+ * #define XTLUT_ASSERT_STRING_EQUAL_MESSAGE( expected, actual, message ) \
+ * ::XtlUt::Impl::checkStringEquals( ::Xtl::toString(expected), \
+ * ::Xtl::toString(actual), \
+ * CPPUNIT_SOURCELINE(), \
+ * message )
+ * \endcode
+ *
+ * In the previous example, the user can specify a simple string for \a message,
+ * or a complex Message object.
+ *
+ * \see Message
+ */
+class CPPUNIT_API AdditionalMessage : public Message
+{
+public:
+ typedef Message SuperClass;
+
+ /// Constructs an empty Message.
+ AdditionalMessage();
+
+ /*! \brief Constructs a Message with the specified detail string.
+ * \param detail1 Detail string of the message. If empty, then it is not added.
+ */
+ AdditionalMessage( const std::string &detail1 );
+
+ /*! \brief Constructs a Message with the specified detail string.
+ * \param detail1 Detail string of the message. If empty, then it is not added.
+ */
+ AdditionalMessage( const char *detail1 );
+
+ /*! \brief Constructs a copy of the specified message.
+ * \param other Message to copy.
+ */
+ AdditionalMessage( const Message &other );
+
+ /*! \brief Assignment operator.
+ * \param other Message to copy.
+ * \return Reference on this object.
+ */
+ AdditionalMessage &operator =( const Message &other );
+
+private:
+};
+
+
+CPPUNIT_NS_END
+
+
+
+#endif // CPPUNIT_ADDITIONALMESSAGE_H