From 539f3f60663024df13c92af23907e2d78efc1ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 5 Sep 2019 19:36:37 +0200 Subject: [PATCH] GL: we can use PVRTC to test this code path on desktop. --- src/Magnum/GL/Test/PixelFormatTest.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/Test/PixelFormatTest.cpp b/src/Magnum/GL/Test/PixelFormatTest.cpp index 199a22044..965c045d9 100644 --- a/src/Magnum/GL/Test/PixelFormatTest.cpp +++ b/src/Magnum/GL/Test/PixelFormatTest.cpp @@ -187,7 +187,7 @@ void PixelFormatTest::mapTypeImplementationSpecificZero() { void PixelFormatTest::mapTypeUnsupported() { #ifndef MAGNUM_TARGET_GLES2 - CORRADE_SKIP("All pixel formats are supported on ES3+"); + CORRADE_SKIP("All pixel formats are supported on ES3+."); #else CORRADE_VERIFY(!hasPixelFormat(Magnum::PixelFormat::RGBA16UI)); @@ -293,15 +293,22 @@ void PixelFormatTest::mapCompressedFormatImplementationSpecific() { } void PixelFormatTest::mapCompressedFormatUnsupported() { - #ifndef MAGNUM_TARGET_GLES2 - CORRADE_SKIP("All pixel formats are supported on ES3+."); - #else + #ifdef MAGNUM_TARGET_GLES2 CORRADE_VERIFY(!hasCompressedPixelFormat(Magnum::CompressedPixelFormat::Etc2RGB8Unorm)); std::ostringstream out; Error redirectError{&out}; compressedPixelFormat(Magnum::CompressedPixelFormat::Etc2RGB8Unorm); CORRADE_COMPARE(out.str(), "GL::compressedPixelFormat(): format CompressedPixelFormat::Etc2RGB8Unorm is not supported on this target\n"); + #elif !defined(MAGNUM_TARGET_GLES) + CORRADE_VERIFY(!hasCompressedPixelFormat(Magnum::CompressedPixelFormat::PvrtcRGB2bppUnorm)); + + std::ostringstream out; + Error redirectError{&out}; + compressedPixelFormat(Magnum::CompressedPixelFormat::PvrtcRGB2bppUnorm); + CORRADE_COMPARE(out.str(), "GL::compressedPixelFormat(): format CompressedPixelFormat::PvrtcRGB2bppUnorm is not supported on this target\n"); + #else + CORRADE_SKIP("All compressed pixel formats are supported on ES3."); #endif }