summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2012-03-26 13:35:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-27 06:28:27 +0200
commitaa291c55b4dd2d647723fa32e9062a4d150d92ef (patch)
tree928a24f2a6231a92eda705a75282b0bcd772b95e /tests
parent6522fecfb15e6414b116e190bb10925aae989f1b (diff)
Make this unit test a bit more robust for qreal changes.
It's not just ARM that has qreal == float (and sometimes not even then) Change-Id: Ic2fa890afd9f926c455442d04dc84e57dffe7787 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp b/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
index 016ad651b..ea613952c 100644
--- a/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
+++ b/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
@@ -996,11 +996,7 @@ void tst_QVideoSurfaceFormat::debugOperator()
" frameWidth = QVariant(int, %6) \n"
" viewport = QVariant(QRect, QRect(0,1 800x600) ) \n"
" scanLineDirection = QVariant(QVideoSurfaceFormat::Direction, ) \n"
-#if defined(Q_PROCESSOR_ARM) // from qglobal.h
- " frameRate = QVariant(float, %7) \n"
-#else
- " frameRate = QVariant(double, %7) \n"
-#endif
+ " frameRate = QVariant(%7, %8) \n"
" pixelAspectRatio = QVariant(QSize, QSize(320, 200) ) \n"
" sizeHint = QVariant(QSize, QSize(1280, 600) ) \n"
" yCbCrColorSpace = QVariant(QVideoSurfaceFormat::YCbCrColorSpace, ) ")
@@ -1010,6 +1006,7 @@ void tst_QVideoSurfaceFormat::debugOperator()
.arg(frameSize.width())
.arg(frameSize.height())
.arg(frameSize.width())
+ .arg(sizeof(qreal) == sizeof(double) ? "double" : "float")
.arg(frameRate);
QVideoSurfaceFormat vsf(frameSize, format, QAbstractVideoBuffer::GLTextureHandle);