tst_QDateTime::addMSecs(): check for failure after calling helper
When the test failed, it did so in triplicate. Pick-to: 6.5 Change-Id: Ia871aed0a5960120a2659a6778c10dccd4b2953a Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
ac653abc41
commit
c8c5b8ac1a
@ -1610,10 +1610,15 @@ void tst_QDateTime::addMSecs()
|
||||
QCOMPARE(result.addMSecs(qint64(-nsecs) * 1000), dt);
|
||||
}
|
||||
};
|
||||
#define VERIFY(datum) \
|
||||
verify(datum); \
|
||||
if (QTest::currentTestFailed()) \
|
||||
return
|
||||
|
||||
verify(dt.addMSecs(qint64(nsecs) * 1000));
|
||||
verify(dt.addDuration(std::chrono::seconds(nsecs)));
|
||||
verify(dt.addDuration(std::chrono::milliseconds(nsecs * 1000)));
|
||||
VERIFY(dt.addMSecs(qint64(nsecs) * 1000));
|
||||
VERIFY(dt.addDuration(std::chrono::seconds(nsecs)));
|
||||
VERIFY(dt.addDuration(std::chrono::milliseconds(nsecs * 1000)));
|
||||
#undef VERIFY
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(6, 9)
|
||||
|
Loading…
Reference in New Issue
Block a user