summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qtendian/qtendian.pro
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-03-21 18:09:09 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-25 13:12:24 +0200
commitfe778b94bd58c12949d763f428d214e8c16d144e (patch)
tree878c41fcc5f18a33d57c34a27cc69f0eb940bb7e /tests/auto/corelib/global/qtendian/qtendian.pro
parent552e162a67a1afcdc4e3e344100abaa6a69ab918 (diff)
Enable endianness conversions on q(u)int8
Lack of support for these types is not a real issue as endian conversions on byte-sized types are no-ops. Still, the conversions are useful as they facilitate writing of generic code. They can also be used explicitly as a way to document in code an endian-specific binary format: uchar *data; quint8 tag = qFromLittleEndian<quint8>(data++); quint32 size = qFromLittleEndian<quint32>(data); This commit also adds a test for functions documented in the QtEndian header. Change-Id: I2f6c876ce89d2adb8c03a1c8a25921d225bf6f92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/global/qtendian/qtendian.pro')
-rw-r--r--tests/auto/corelib/global/qtendian/qtendian.pro4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qtendian/qtendian.pro b/tests/auto/corelib/global/qtendian/qtendian.pro
new file mode 100644
index 0000000000..caad0fc764
--- /dev/null
+++ b/tests/auto/corelib/global/qtendian/qtendian.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase parallel_test
+TARGET = tst_qtendian
+QT = core testlib
+SOURCES = tst_qtendian.cpp