From d242d78339db2f2443c61dc10b55b6c68ab87f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 29 Nov 2011 17:05:24 +0100 Subject: Make tst_QVariant::canConvertMetaTypeToInt more verbose. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If17cbd1154c4fd3c006648b28e91a009de5b373b Reviewed-by: João Abecasis --- .../auto/corelib/kernel/qvariant/tst_qvariant.cpp | 33 +++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'tests') 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,21 +2592,28 @@ 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. -- cgit v1.2.3