Make tst_QVariant::canConvertMetaTypeToInt more verbose.
Change-Id: If17cbd1154c4fd3c006648b28e91a009de5b373b Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This commit is contained in:
parent
097a3f4231
commit
d242d78339
@ -2592,22 +2592,29 @@ template<typename T> void convertMetaType()
|
||||
QCOMPARE(qVariantFromValue<T>(10), qVariantFromValue<T>(10));
|
||||
}
|
||||
|
||||
#define CONVERT_META_TYPE(Type) \
|
||||
convertMetaType<Type>(); \
|
||||
if (QTest::currentTestFailed()) \
|
||||
QFAIL("convertMetaType<" #Type "> failed");
|
||||
|
||||
void tst_QVariant::canConvertMetaTypeToInt() const
|
||||
{
|
||||
convertMetaType<long>();
|
||||
convertMetaType<short>();
|
||||
convertMetaType<short>();
|
||||
convertMetaType<unsigned short>();
|
||||
convertMetaType<ushort>();
|
||||
convertMetaType<ulong>();
|
||||
convertMetaType<unsigned long>();
|
||||
convertMetaType<uchar>();
|
||||
convertMetaType<unsigned char>();
|
||||
convertMetaType<char>();
|
||||
convertMetaType<uint>();
|
||||
convertMetaType<unsigned int>();
|
||||
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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user