summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmetatype
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-16 15:04:17 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-16 16:22:18 +0200
commit8afc6773067bb878020c29b3bebfe8662e3fbfdd (patch)
tree33714f6a948e0bddc19ba6fabb79b4b668da1e0c /tests/auto/qmetatype
parent48c296a4efec203c60dcaccf08cb7ff52d692af5 (diff)
QMetaType: add "signed char" as builtin.
According to the c++ specificaiton, 3.9.1 [basic.fundamentals] Plain char, signed char, and unsigned char are three distinct types In QMetaType, I decide that 'signed char' alias with 'char' This allow qint8 to work nice (and which is already registered as an alias to char (QMetaType::Char) Reviewed-by: Joao Task-number: QTBUG-12920
Diffstat (limited to 'tests/auto/qmetatype')
-rw-r--r--tests/auto/qmetatype/tst_qmetatype.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp
index 8558e06f95..eaa19d07ed 100644
--- a/tests/auto/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/qmetatype/tst_qmetatype.cpp
@@ -160,6 +160,11 @@ void tst_QMetaType::qMetaTypeId()
QCOMPARE(::qMetaTypeId<QString>(), int(QMetaType::QString));
QCOMPARE(::qMetaTypeId<int>(), int(QMetaType::Int));
QCOMPARE(::qMetaTypeId<TestSpace::Foo>(), QMetaType::type("TestSpace::Foo"));
+
+ QCOMPARE(::qMetaTypeId<char>(), QMetaType::type("char"));
+ QCOMPARE(::qMetaTypeId<uchar>(), QMetaType::type("unsigned char"));
+ QCOMPARE(::qMetaTypeId<signed char>(), QMetaType::type("signed char"));
+ QCOMPARE(::qMetaTypeId<qint8>(), QMetaType::type("qint8"));
}
void tst_QMetaType::properties()