diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-24 15:49:08 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-24 21:23:34 +0000 |
commit | 424e6386c642f1936ab751717623ccb6b7e24722 (patch) | |
tree | cc9bfa80f7850c2cedb61cf88a18859ed235d1a6 /tests/auto/gui | |
parent | 831c557cc5c2e06d41bfe815450d50cb8be18354 (diff) |
tests/auto/opengl: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I7add5b7afeba83895acdcbed110e8275dc76864a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 8c6c28b492..7a47b69a26 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -514,7 +514,7 @@ void tst_QOpenGL::fboTextureOwnership() // pull out the texture GLuint texture = fbo->takeTexture(); QVERIFY(texture != 0); - QVERIFY(fbo->texture() == 0); + QCOMPARE(fbo->texture(), GLuint(0)); // verify that the next bind() creates a new texture fbo->bind(); @@ -1174,18 +1174,18 @@ void tst_QOpenGL::textureblitterPartTargetRectTransform() void tst_QOpenGL::defaultSurfaceFormat() { QSurfaceFormat fmt; - QVERIFY(QSurfaceFormat::defaultFormat() == fmt); + QCOMPARE(QSurfaceFormat::defaultFormat(), fmt); fmt.setDepthBufferSize(16); QSurfaceFormat::setDefaultFormat(fmt); - QVERIFY(QSurfaceFormat::defaultFormat() == fmt); + QCOMPARE(QSurfaceFormat::defaultFormat(), fmt); QCOMPARE(QSurfaceFormat::defaultFormat().depthBufferSize(), 16); QScopedPointer<QWindow> window(new QWindow); - QVERIFY(window->requestedFormat() == fmt); + QCOMPARE(window->requestedFormat(), fmt); QScopedPointer<QOpenGLContext> context(new QOpenGLContext); - QVERIFY(context->format() == fmt); + QCOMPARE(context->format(), fmt); } #ifdef USE_GLX @@ -1214,7 +1214,7 @@ void tst_QOpenGL::glxContextWrap() QOpenGLContext *ctx = new QOpenGLContext; ctx->setNativeHandle(QVariant::fromValue<QGLXNativeContext>(QGLXNativeContext(context))); QVERIFY(ctx->create()); - QVERIFY(ctx->nativeHandle().value<QGLXNativeContext>().context() == context); + QCOMPARE(ctx->nativeHandle().value<QGLXNativeContext>().context(), context); QVERIFY(nativeIf->nativeResourceForContext(QByteArrayLiteral("glxcontext"), ctx) == (void *) context); QVERIFY(ctx->makeCurrent(window)); |