diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index cb4952fd69..a3d841d04d 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -2592,22 +2592,29 @@ template void convertMetaType() QCOMPARE(qVariantFromValue(10), qVariantFromValue(10)); } +#define CONVERT_META_TYPE(Type) \ + convertMetaType(); \ + if (QTest::currentTestFailed()) \ + QFAIL("convertMetaType<" #Type "> failed"); + void tst_QVariant::canConvertMetaTypeToInt() const { - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); - convertMetaType(); + CONVERT_META_TYPE(long); + CONVERT_META_TYPE(short); + CONVERT_META_TYPE(short); + CONVERT_META_TYPE(unsigned short); + CONVERT_META_TYPE(ushort); + CONVERT_META_TYPE(ulong); + CONVERT_META_TYPE(unsigned long); + CONVERT_META_TYPE(uchar); + CONVERT_META_TYPE(unsigned char); + CONVERT_META_TYPE(char); + CONVERT_META_TYPE(uint); + CONVERT_META_TYPE(unsigned int); } +#undef CONVERT_META_TYPE + /*! These calls should not produce any warnings. */