diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-11-26 22:30:27 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-11-26 22:35:48 +0100 |
commit | 4a8273a6fc2e741e811cf5dabc9a3c240306cf7f (patch) | |
tree | 2148abc88f8543eecdc0b97b2dd92594836af9b2 /tests/auto/corelib/global | |
parent | 036c5db468164297d213764c59a4b59daa76d90a (diff) | |
parent | 1c2be58fecaff1de5f2849192eb712984ebd59bd (diff) |
Merge remote-tracking branch 'origin/stable' into dev
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we
need to support windows phone in the target branch while it is not there
in the current stable branch (as of Qt 5.2).
Conflicts:
configure
qmake/generators/win32/msvc_nmake.cpp
src/3rdparty/angle/src/libEGL/Surface.cpp
src/angle/src/common/common.pri
src/corelib/global/qglobal.h
src/corelib/io/qstandardpaths.cpp
src/plugins/platforms/qnx/qqnxintegration.cpp
src/plugins/platforms/qnx/qqnxscreeneventhandler.h
src/plugins/platforms/xcb/qglxintegration.h
src/widgets/kernel/win.pri
tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
tools/configure/configureapp.cpp
Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r-- | tests/auto/corelib/global/qflags/tst_qflags.cpp | 2 | ||||
-rw-r--r-- | tests/auto/corelib/global/qglobal/tst_qglobal.cpp | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp index e50a6b63fe..73a69a1309 100644 --- a/tests/auto/corelib/global/qflags/tst_qflags.cpp +++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp @@ -99,7 +99,7 @@ void tst_QFlags::testFlagMultiBits() const } } -template <int N, typename T> bool verifyConstExpr(T n) { return n == N; } +template <unsigned int N, typename T> bool verifyConstExpr(T n) { return n == N; } void tst_QFlags::constExpr() { diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index 4a50a45ea6..0d08e912f8 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -59,6 +59,7 @@ private slots: void qCoreAppStartupFunctionRestart(); void isEnum(); void qAlignOf(); + void integerForSize(); }; void tst_QGlobal::qIsNull() @@ -566,5 +567,19 @@ void tst_QGlobal::qAlignOf() #undef TEST_AlignOf_RValueRef #undef TEST_AlignOf_impl +void tst_QGlobal::integerForSize() +{ + // compile-only test: + Q_STATIC_ASSERT(sizeof(QIntegerForSize<1>::Signed) == 1); + Q_STATIC_ASSERT(sizeof(QIntegerForSize<2>::Signed) == 2); + Q_STATIC_ASSERT(sizeof(QIntegerForSize<4>::Signed) == 4); + Q_STATIC_ASSERT(sizeof(QIntegerForSize<8>::Signed) == 8); + + Q_STATIC_ASSERT(sizeof(QIntegerForSize<1>::Unsigned) == 1); + Q_STATIC_ASSERT(sizeof(QIntegerForSize<2>::Unsigned) == 2); + Q_STATIC_ASSERT(sizeof(QIntegerForSize<4>::Unsigned) == 4); + Q_STATIC_ASSERT(sizeof(QIntegerForSize<8>::Unsigned) == 8); +} + QTEST_APPLESS_MAIN(tst_QGlobal) #include "tst_qglobal.moc" |