tests/auto/qdatetime/tst_qdatetime.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
--- a/tests/auto/qdatetime/tst_qdatetime.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -447,7 +447,15 @@
     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
+    //year may be 2 or 4 digits
+    QVERIFY(str3.contains("95"));
+    //day and month may be in numeric or word form
+    QVERIFY(str3.contains("12"));
+    QVERIFY(str3.contains("34"));
+    //seconds may be absent
 }
 
 void tst_QDateTime::addDays()