equal
deleted
inserted
replaced
445 |
445 |
446 QString str2 = dt1.toString(Qt::ISODate); |
446 QString str2 = dt1.toString(Qt::ISODate); |
447 QCOMPARE(str2, QString("1995-05-20T12:34:56")); |
447 QCOMPARE(str2, QString("1995-05-20T12:34:56")); |
448 |
448 |
449 QString str3 = dt1.toString(Qt::LocalDate); |
449 QString str3 = dt1.toString(Qt::LocalDate); |
|
450 qDebug() << str3; |
450 QVERIFY(!str3.isEmpty()); |
451 QVERIFY(!str3.isEmpty()); |
|
452 //check for date/time components in any order |
|
453 //year may be 2 or 4 digits |
|
454 QVERIFY(str3.contains("95")); |
|
455 //day and month may be in numeric or word form |
|
456 QVERIFY(str3.contains("12")); |
|
457 QVERIFY(str3.contains("34")); |
|
458 //seconds may be absent |
451 } |
459 } |
452 |
460 |
453 void tst_QDateTime::addDays() |
461 void tst_QDateTime::addDays() |
454 { |
462 { |
455 for (int pass = 0; pass < 2; ++pass) { |
463 for (int pass = 0; pass < 2; ++pass) { |