summaryrefslogtreecommitdiffstats
path: root/tests/auto/opengl/qgl/tst_qgl.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2012-09-04 12:40:16 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 06:24:38 +0200
commit34cd8fd566cd61385db12112d9515b0d5388dad3 (patch)
tree0f311e165c03c040f2c32261f96d80965443d4c6 /tests/auto/opengl/qgl/tst_qgl.cpp
parent6fd1895b918c45d8404ff38319f508f0357cba27 (diff)
tests: Don't omit the body of a test function with QT_BUILD_INTERNAL
Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
Diffstat (limited to 'tests/auto/opengl/qgl/tst_qgl.cpp')
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 077285213b..252772c78a 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -72,7 +72,12 @@ public:
private slots:
void initTestCase();
void getSetCheck();
+#ifdef QT_BUILD_INTERNAL
+ void qglContextDefaultBindTexture();
void openGLVersionCheck();
+ void shareRegister();
+ void textureCleanup();
+#endif
void graphicsViewClipping();
void partialGLWidgetUpdates_data();
void partialGLWidgetUpdates();
@@ -91,9 +96,6 @@ private slots:
void replaceClipping();
void clipTest();
void destroyFBOAfterContext();
- void shareRegister();
- void qglContextDefaultBindTexture();
- void textureCleanup();
void threadImages();
void nullRectCrash();
};
@@ -654,9 +656,9 @@ extern QGLFormat::OpenGLVersionFlags qOpenGLVersionFlagsFromString(const QString
QT_END_NAMESPACE
#endif
+#ifdef QT_BUILD_INTERNAL
void tst_QGL::openGLVersionCheck()
{
-#ifdef QT_BUILD_INTERNAL
QString versionString;
QGLFormat::OpenGLVersionFlags expectedFlag;
QGLFormat::OpenGLVersionFlags versionFlag;
@@ -751,8 +753,8 @@ void tst_QGL::openGLVersionCheck()
#else
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
#endif //defined(QT_OPENGL_ES_1)
-#endif //QT_BUILD_INTERNAL
}
+#endif //QT_BUILD_INTERNAL
static bool fuzzyComparePixels(const QRgb testPixel, const QRgb refPixel, const char* file, int line, int x = -1, int y = -1)
{
@@ -1817,12 +1819,12 @@ int tst_QGLResource::deletions = 0;
#ifdef TODO
Q_GLOBAL_STATIC(QOpenGLContextGroupResource<tst_QGLResource>, qt_shared_test)
#endif //TODO
-#endif
+#endif // QT_BUILD_INTERNAL
+#ifdef QT_BUILD_INTERNAL
void tst_QGL::shareRegister()
{
#ifdef TODO
-#ifdef QT_BUILD_INTERNAL
// Create a context.
QGLWidget *glw1 = new QGLWidget();
glw1->makeCurrent();
@@ -1932,14 +1934,14 @@ void tst_QGL::shareRegister()
QVERIFY(guard.id() == 0);
QVERIFY(guard3.context() == 0);
QVERIFY(guard3.id() == 0);
-#endif
#endif //TODO
}
+#endif
// Tests QGLContext::bindTexture with default options
+#ifdef QT_BUILD_INTERNAL
void tst_QGL::qglContextDefaultBindTexture()
{
-#ifdef QT_BUILD_INTERNAL
QGLWidget w;
w.makeCurrent();
QGLContext *ctx = const_cast<QGLContext*>(w.context());
@@ -1981,12 +1983,12 @@ void tst_QGL::qglContextDefaultBindTexture()
ctx->deleteTexture(boundPixmapTextureId);
QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_FALSE);
QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_FALSE);
-#endif
}
+#endif
+#ifdef QT_BUILD_INTERNAL
void tst_QGL::textureCleanup()
{
-#ifdef QT_BUILD_INTERNAL
QGLWidget w;
w.resize(200,200);
w.show();
@@ -2176,8 +2178,8 @@ void tst_QGL::textureCleanup()
copyOfPixmap = QPixmap();
QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-#endif
}
+#endif
namespace ThreadImages {