diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-05-22 15:30:27 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-05-22 15:43:28 +0200 |
commit | cf909f0ef609c4581ebbe2f81c7ae0c5e43d653f (patch) | |
tree | fe7f55926db41006382013c4debab19b5dad083d /tests | |
parent | dca0efc70deb114c8d22113e4d5ce60c44c5299d (diff) |
Tidy up in tst_QDateTime
Use QCOMPARE rather than QVERIFY an equality; ditch a stray blank line.
Change-Id: Ie828837919fb9d3cc774d82d0eebcf7728fed645
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 38b72ab91f..6f0aebb071 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2016 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** @@ -1005,7 +1005,6 @@ void tst_QDateTime::toString_enumformat() { QDateTime dt1(QDate(1995, 5, 20), QTime(12, 34, 56)); - QString str1 = dt1.toString(Qt::TextDate); QVERIFY(!str1.isEmpty()); // It's locale dependent everywhere @@ -2776,9 +2775,9 @@ void tst_QDateTime::getDate() int y = -33, m = -44, d = -55; QDate date; date.getDate(&y, &m, &d); - QVERIFY(date.year() == y); - QVERIFY(date.month() == m); - QVERIFY(date.day() == d); + QCOMPARE(date.year(), y); + QCOMPARE(date.month(), m); + QCOMPARE(date.day(), d); date.getDate(0, 0, 0); } @@ -2790,9 +2789,9 @@ void tst_QDateTime::getDate() date.getDate(&y, 0, 0); date.getDate(0, 0, &d); - QVERIFY(date.year() == y); - QVERIFY(date.month() == m); - QVERIFY(date.day() == d); + QCOMPARE(date.year(), y); + QCOMPARE(date.month(), m); + QCOMPARE(date.day(), d); } } |