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/opengl/qglbuffer/tst_qglbuffer.cpp | |
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/opengl/qglbuffer/tst_qglbuffer.cpp')
-rw-r--r-- | tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp index b0409d46d0..f96e3514a7 100644 --- a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp +++ b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp @@ -86,14 +86,14 @@ void tst_QGLBuffer::testBuffer(QGLBuffer::Type type) // Create the local object, but not the buffer in the server. QGLBuffer buffer(type); - QVERIFY(buffer.usagePattern() == QGLBuffer::StaticDraw); + QCOMPARE(buffer.usagePattern(), QGLBuffer::StaticDraw); buffer.setUsagePattern(QGLBuffer::UsagePattern(usagePattern)); // Check the initial state. - QVERIFY(buffer.type() == type); + QCOMPARE(buffer.type(), type); QVERIFY(!buffer.isCreated()); - QVERIFY(buffer.bufferId() == 0); - QVERIFY(buffer.usagePattern() == QGLBuffer::UsagePattern(usagePattern)); + QCOMPARE(buffer.bufferId(), GLuint(0)); + QCOMPARE(buffer.usagePattern(), QGLBuffer::UsagePattern(usagePattern)); QCOMPARE(buffer.size(), -1); // Should not be able to bind it yet because it isn't created. @@ -253,7 +253,7 @@ void tst_QGLBuffer::bufferSharing() delete w2; // The buffer should now be invalid. - QVERIFY(buffer.bufferId() == 0); + QCOMPARE(buffer.bufferId(), GLuint(0)); QVERIFY(!buffer.isCreated()); } |