diff options
Diffstat (limited to 'tests/auto/gui/qopengl')
-rw-r--r-- | tests/auto/gui/qopengl/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 15 |
2 files changed, 21 insertions, 5 deletions
diff --git a/tests/auto/gui/qopengl/CMakeLists.txt b/tests/auto/gui/qopengl/CMakeLists.txt index 3be29695a5..48e07d2878 100644 --- a/tests/auto/gui/qopengl/CMakeLists.txt +++ b/tests/auto/gui/qopengl/CMakeLists.txt @@ -1,13 +1,20 @@ -# Generated from qopengl.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qopengl Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qopengl LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qopengl SOURCES tst_qopengl.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::CorePrivate Qt::Gui Qt::GuiPrivate diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 58e09f7d1b..af59f3e31a 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtOpenGL/QOpenGLFramebufferObject> #include <QtOpenGL/QOpenGLPaintDevice> @@ -620,6 +620,10 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat) void tst_QOpenGL::fboRenderingRGB30() { +#ifdef Q_OS_ANDROID + if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31) + QSKIP("Fails on Android 12 (QTBUG-105738)"); +#endif #if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(__x86_64__) QSKIP("QTBUG-22617"); #endif @@ -1588,6 +1592,13 @@ void tst_QOpenGL::bufferCreate() buf.allocate(128); QCOMPARE(buf.size(), 128); + { + QOpenGLBuffer moved = std::move(buf); + QCOMPARE_EQ(moved.isCreated(), true); + QCOMPARE_EQ(moved.size(), 128); + buf = std::move(moved); + } + buf.release(); buf.destroy(); @@ -1625,8 +1636,6 @@ void tst_QOpenGL::bufferMapRange() buf.unmap(); p = (char *) buf.mapRange(0, sizeof(data), QOpenGLBuffer::RangeRead); - if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) - QEXPECT_FAIL("", "This fails on Wayland, see QTBUG-100918.", Abort); QVERIFY(!strcmp(p, "sOMe data")); buf.unmap(); |