diff --git a/src/Magnum/GL/Test/PixelFormatTest.cpp b/src/Magnum/GL/Test/PixelFormatTest.cpp index 7bf017366..ec39b6037 100644 --- a/src/Magnum/GL/Test/PixelFormatTest.cpp +++ b/src/Magnum/GL/Test/PixelFormatTest.cpp @@ -117,8 +117,8 @@ void PixelFormatTest::mapFormatTypeTextureFormat() { for(UnsignedInt i = 1; i <= 0xffff; ++i) { const auto format = Magnum::PixelFormat(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) - that there was no gap (unhandled value inside the range) - that a particular pixel format maps to a particular GL format - that a particular pixel type maps to a particular GL type */ @@ -327,8 +327,8 @@ void PixelFormatTest::mapCompressedFormatTextureFormat() { for(UnsignedInt i = 1; i <= 0xffff; ++i) { const auto format = Magnum::CompressedPixelFormat(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) - that there was no gap (unhandled value inside the range) - that a particular pixel format maps to a particular GL format - that a particular pixel type maps to a particular GL type */ diff --git a/src/Magnum/Test/MeshTest.cpp b/src/Magnum/Test/MeshTest.cpp index 517ad4440..d212d4bf5 100644 --- a/src/Magnum/Test/MeshTest.cpp +++ b/src/Magnum/Test/MeshTest.cpp @@ -67,8 +67,8 @@ void MeshTest::primitiveMapping() { for(UnsignedInt i = 0; i <= 0xff; ++i) { const auto primitive = MeshPrimitive(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) - that there was no gap (unhandled value inside the range) */ #ifdef __GNUC__ #pragma GCC diagnostic push @@ -77,6 +77,7 @@ void MeshTest::primitiveMapping() { switch(primitive) { #define _c(primitive) \ case MeshPrimitive::primitive: \ + CORRADE_COMPARE(Utility::ConfigurationValue::toString(MeshPrimitive::primitive, {}), #primitive); \ CORRADE_COMPARE(nextHandled, i); \ CORRADE_COMPARE(firstUnhandled, 0xff); \ ++nextHandled; \ @@ -104,8 +105,8 @@ void MeshTest::indexTypeMapping() { for(UnsignedInt i = 0; i <= 0xff; ++i) { const auto type = MeshIndexType(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) - that there was no gap (unhandled value inside the range) */ #ifdef __GNUC__ #pragma GCC diagnostic push @@ -114,6 +115,7 @@ void MeshTest::indexTypeMapping() { switch(type) { #define _c(type) \ case MeshIndexType::type: \ + CORRADE_COMPARE(Utility::ConfigurationValue::toString(MeshIndexType::type, {}), #type); \ CORRADE_COMPARE(nextHandled, i); \ CORRADE_COMPARE(firstUnhandled, 0xff); \ ++nextHandled; \ diff --git a/src/Magnum/Test/PixelFormatTest.cpp b/src/Magnum/Test/PixelFormatTest.cpp index 749d2ccf3..bdd8bbcdc 100644 --- a/src/Magnum/Test/PixelFormatTest.cpp +++ b/src/Magnum/Test/PixelFormatTest.cpp @@ -112,11 +112,9 @@ void PixelFormatTest::mapping() { for(UnsignedInt i = 1; i <= 0xffff; ++i) { const auto format = PixelFormat(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) - - that there was no gap (unhandled value inside the range) - - that a particular pixel format maps to a particular GL format - - that a particular pixel type maps to a particular GL type */ + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) + - that there was no gap (unhandled value inside the range) */ #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic error "-Wswitch" @@ -124,6 +122,7 @@ void PixelFormatTest::mapping() { switch(format) { #define _c(format) \ case PixelFormat::format: \ + CORRADE_COMPARE(Utility::ConfigurationValue::toString(PixelFormat::format, {}), #format); \ CORRADE_COMPARE(nextHandled, i); \ CORRADE_COMPARE(firstUnhandled, 0xffff); \ ++nextHandled; \ @@ -152,11 +151,9 @@ void PixelFormatTest::compressedMapping() { for(UnsignedInt i = 1; i <= 0xffff; ++i) { const auto format = CompressedPixelFormat(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) - - that there was no gap (unhandled value inside the range) - - that a particular pixel format maps to a particular GL format - - that a particular pixel type maps to a particular GL type */ + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) + - that there was no gap (unhandled value inside the range) */ #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic error "-Wswitch" @@ -164,6 +161,7 @@ void PixelFormatTest::compressedMapping() { switch(format) { #define _c(format, width, height, depth, size) \ case CompressedPixelFormat::format: \ + CORRADE_COMPARE(Utility::ConfigurationValue::toString(CompressedPixelFormat::format, {}), #format); \ CORRADE_COMPARE(nextHandled, i); \ CORRADE_COMPARE(firstUnhandled, 0xffff); \ CORRADE_COMPARE(Magnum::compressedBlockSize(CompressedPixelFormat::format), (Vector3i{width, height, depth})); \ diff --git a/src/Magnum/Vk/Test/EnumsTest.cpp b/src/Magnum/Vk/Test/EnumsTest.cpp index 081f22e2b..0e8e8cb02 100644 --- a/src/Magnum/Vk/Test/EnumsTest.cpp +++ b/src/Magnum/Vk/Test/EnumsTest.cpp @@ -185,8 +185,8 @@ void EnumsTest::mapVkFormat() { for(UnsignedInt i = 1; i <= 0xffff; ++i) { const auto format = Magnum::PixelFormat(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) - that there was no gap (unhandled value inside the range) - that a particular pixel format maps to a particular GL format - that a particular pixel type maps to a particular GL type */ @@ -273,8 +273,8 @@ void EnumsTest::mapVkFormatCompressed() { for(UnsignedInt i = 1; i <= 0xffff; ++i) { const auto format = Magnum::CompressedPixelFormat(i); /* Each case verifies: - - that the cases are ordered by number (so insertion here is done in - proper place) + - that the entries are ordered by number by comparing a function to + expected result (so insertion here is done in proper place) - that there was no gap (unhandled value inside the range) - that a particular pixel format maps to a particular GL format - that a particular pixel type maps to a particular GL type */