1 #ifndef HAMCRESTQT_DESCRIPTION_H
2 #define HAMCRESTQT_DESCRIPTION_H
5 #include "tostring_p.h"
53 template <
typename Iterator>
55 Iterator startIterator, Iterator endIterator)
57 bool separate =
false;
60 while (startIterator != endIterator) {
61 if (separate) appendString(separator);
75 virtual QString
toString()
const = 0;
77 class NullDescription;
81 virtual void appendString(
const QString &str) = 0;
82 virtual void append(
const QChar &c) = 0;
84 virtual void toCppSyntaxString(
const QString &unformatted);
85 virtual void toCppSyntax(
const QChar &ch);
93 appendString(QTest::toString(value));
100 #endif // HAMCRESTQT_DESCRIPTION_H
A description of a Matcher.
Definition: description.h:17
Description & appendValue(const T &value)
Appends an arbitrary value to the description.
Definition: description.h:90
Description & appendList(const QString &start, const QString &separator, const QString &end, Iterator startIterator, Iterator endIterator)
Appends a list of SelfDescribing objects to the description.
Definition: description.h:54
virtual QString toString() const =0
Converts the description into a QString value.
virtual Description & appendText(const QString &text)=0
Appends some plain text to the description.
virtual Description & appendDescriptionOf(const SelfDescribing &value)=0
Appends the description of a SelfDescribing value to this description.
The ability of an object to describe itself.
Definition: selfdescribing.h:11