mirror of https://github.com/qt/qtbase.git
Use QTest::failOnWarning() in a test whose comment said the equivalent
We can now actually make "should not produce warnings" a test condition, so do so. Amends the start of public history. Change-Id: I58b7ba71cab59d1dec445f1408849527d6a38865 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
8a5b558400
commit
caee07c5c8
|
@ -3413,11 +3413,9 @@ void tst_QVariant::canConvertMetaTypeToInt() const
|
||||||
|
|
||||||
#undef CONVERT_META_TYPE
|
#undef CONVERT_META_TYPE
|
||||||
|
|
||||||
/*!
|
|
||||||
These calls should not produce any warnings.
|
|
||||||
*/
|
|
||||||
void tst_QVariant::variantToDateTimeWithoutWarnings() const
|
void tst_QVariant::variantToDateTimeWithoutWarnings() const
|
||||||
{
|
{
|
||||||
|
QTest::failOnWarning(); // These calls should not produce any warnings.
|
||||||
{
|
{
|
||||||
const QVariant variant(QLatin1String("An invalid QDateTime string"));
|
const QVariant variant(QLatin1String("An invalid QDateTime string"));
|
||||||
const QDateTime dateTime(variant.toDateTime());
|
const QDateTime dateTime(variant.toDateTime());
|
||||||
|
|
Loading…
Reference in New Issue