diff options
Diffstat (limited to 'tests/auto/gui/qopenglconfig')
-rw-r--r-- | tests/auto/gui/qopenglconfig/buglist.json | 22 | ||||
-rw-r--r-- | tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp | 26 |
2 files changed, 44 insertions, 4 deletions
diff --git a/tests/auto/gui/qopenglconfig/buglist.json b/tests/auto/gui/qopenglconfig/buglist.json index c7b8e61bc8..ef311612b2 100644 --- a/tests/auto/gui/qopenglconfig/buglist.json +++ b/tests/auto/gui/qopenglconfig/buglist.json @@ -103,6 +103,28 @@ ] }, { + "id": 7, + "description": "driver description test", + "driver_description": "Long And Special Driver Description", + "os": { + "type": "win" + }, + "features": [ + "feature2" + ] + }, + { + "id": 8, + "description": "Windows version test", + "os": { + "type": "win", + "release": [ "10" ] + }, + "features": [ + "win10_feature" + ] + }, + { "id": 128, "description": "check for matching GL_VENDOR", "gl_vendor": "The Qt Company", diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp index f88cbdc758..3bf59910f3 100644 --- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp +++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp @@ -243,25 +243,43 @@ void tst_QOpenGlConfig::testBugList() QSet<QString> expectedFeatures; expectedFeatures << "feature1"; + // adapter info QVersionNumber driverVersion(QVector<int>() << 9 << 18 << 13 << 4460); - QOpenGLConfig::Gpu gpu = QOpenGLConfig::Gpu::fromDevice(0x10DE, 0x0DE9, driverVersion); + QOpenGLConfig::Gpu gpu = QOpenGLConfig::Gpu::fromDevice(0x10DE, 0x0DE9, driverVersion, QByteArrayLiteral("Unknown")); QSet<QString> actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("win"), - QVersionNumber(6, 3), fileName); + QVersionNumber(6, 3), QStringLiteral("7"), fileName); QVERIFY2(expectedFeatures == actualFeatures, msgSetMismatch(expectedFeatures, actualFeatures)); + // driver_description + gpu = QOpenGLConfig::Gpu::fromDevice(0xDEAD, 0xBEEF, driverVersion, QByteArrayLiteral("Very Long And Special Driver Description")); + actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("win"), + QVersionNumber(6, 3), QStringLiteral("8"), fileName); + expectedFeatures = QSet<QString>() << "feature2"; + QVERIFY2(expectedFeatures == actualFeatures, + msgSetMismatch(expectedFeatures, actualFeatures)); + + // os.release + gpu = QOpenGLConfig::Gpu::fromDevice(0xDEAD, 0xBEEF, driverVersion, QByteArrayLiteral("WinVerTest")); + actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("win"), + QVersionNumber(12, 34), QStringLiteral("10"), fileName); + expectedFeatures = QSet<QString>() << "win10_feature"; + QVERIFY2(expectedFeatures == actualFeatures, + msgSetMismatch(expectedFeatures, actualFeatures)); + + // gl_vendor gpu = QOpenGLConfig::Gpu::fromGLVendor(QByteArrayLiteral("Somebody Else")); expectedFeatures.clear(); actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("linux"), - QVersionNumber(1, 0), fileName); + QVersionNumber(1, 0), QString(), fileName); QVERIFY2(expectedFeatures == actualFeatures, msgSetMismatch(expectedFeatures, actualFeatures)); gpu = QOpenGLConfig::Gpu::fromGLVendor(QByteArrayLiteral("The Qt Company")); expectedFeatures = QSet<QString>() << "cool_feature"; actualFeatures = QOpenGLConfig::gpuFeatures(gpu, QStringLiteral("linux"), - QVersionNumber(1, 0), fileName); + QVersionNumber(1, 0), QString(), fileName); QVERIFY2(expectedFeatures == actualFeatures, msgSetMismatch(expectedFeatures, actualFeatures)); } |