summaryrefslogtreecommitdiff
path: root/tests/testhelpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testhelpers.h')
-rw-r--r--tests/testhelpers.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/testhelpers.h b/tests/testhelpers.h
index 546bc30..f0e3889 100644
--- a/tests/testhelpers.h
+++ b/tests/testhelpers.h
@@ -312,6 +312,21 @@ namespace QTest {
return qstrdup(ba.data());
}
+ template<>
+ char *toString(const Kolab::Duration &p)
+ {
+ QByteArray ba = "Kolab::Duration";
+ ba += p.isNegative() ? "-": "+";
+ ba += "(";
+ ba += QString::number(p.weeks())+ ", ";
+ ba += QString::number(p.days())+ ", ";
+ ba += QString::number(p.hours())+ ", ";
+ ba += QString::number(p.minutes())+ ", ";
+ ba += QString::number(p.seconds());
+ ba += ")";
+ return qstrdup(ba.data());
+ }
+
}
#endif