summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qvariant
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-13 16:13:29 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:17:50 +0200
commitfefb1c136220750ff4bbe2638108c4f7273bab19 (patch)
tree912e7f452c470798d62e2120b78aecaacfa55409 /tests/auto/corelib/kernel/qvariant
parentf21a7116e950286b7f13cdff23aab653fefc2ddb (diff)
Move enum conversions over into QMetaType
Take the opportunity to properly handle the underlying type (size and signed vs unsigned). Change-Id: I0cb8cf40acac6de03c24ed3fe570db68268952c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qvariant')
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index c1fa8b0a9a..a722e53f48 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -4366,11 +4366,6 @@ template<typename Enum> void testVariant(Enum value, bool *ok)
QCOMPARE(var.value<short>(), static_cast<short>(value));
QCOMPARE(var.value<unsigned short>(), static_cast<unsigned short>(value));
QCOMPARE(var.value<qint64>(), static_cast<qint64>(value));
- if (sizeof(value) < 8 && static_cast<qint64>(value) < 0) {
- QEXPECT_FAIL("", "The metatype system don't store the sign of enums", Continue);
- // The value is stored internaly with 32 bit. When asked to convert it to 64 bit unsigned,
- // we consider that the value was unsigned, so we don't extent the bit signs
- }
QCOMPARE(var.value<quint64>(), static_cast<quint64>(value));
QVariant var2 = var;