diff options
Diffstat (limited to 'tests/auto/qdatetime/tst_qdatetime.cpp')
-rw-r--r-- | tests/auto/qdatetime/tst_qdatetime.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index 8fb0c91..c53780e 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -447,7 +447,14 @@ void tst_QDateTime::toString_enumformat() QCOMPARE(str2, QString("1995-05-20T12:34:56")); QString str3 = dt1.toString(Qt::LocalDate); + qDebug() << str3; QVERIFY(!str3.isEmpty()); + //check for date/time components in any order + QVERIFY(str3.contains("1995")); + //day and month may be in numeric or word form + QVERIFY(str3.contains("12")); + QVERIFY(str3.contains("34")); + QVERIFY(str3.contains("56")); } void tst_QDateTime::addDays() |