From 3d5f50ac49b5f2c59dc21651c884f3bfe524d3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 19 Jul 2019 14:17:32 +0200 Subject: [PATCH] Test: use the new setTestCaseTemplateName(). --- .../GL/Test/CubeMapTextureArrayGLTest.cpp | 4 +-- src/Magnum/GL/Test/CubeMapTextureGLTest.cpp | 4 +-- src/Magnum/GL/Test/MeshGLTest.cpp | 25 ++++++++----------- src/Magnum/GL/Test/RectangleTextureGLTest.cpp | 4 +-- src/Magnum/GL/Test/TextureArrayGLTest.cpp | 8 +++--- src/Magnum/GL/Test/TextureGLTest.cpp | 12 ++++----- src/Magnum/Math/Algorithms/Test/SvdTest.cpp | 2 +- src/Magnum/Math/Test/AngleTest.cpp | 4 +-- src/Magnum/Math/Test/ComplexTest.cpp | 4 +-- src/Magnum/Math/Test/ConstantsTest.cpp | 4 +-- src/Magnum/Math/Test/DualComplexTest.cpp | 6 ++--- src/Magnum/Math/Test/DualQuaternionTest.cpp | 6 ++--- src/Magnum/Math/Test/QuaternionTest.cpp | 4 +-- .../Math/Test/StrictWeakOrderingTest.cpp | 5 ++-- src/Magnum/Math/Test/TypeTraitsTest.cpp | 16 ++++++------ src/Magnum/Shaders/Test/FlatGLTest.cpp | 12 ++++++--- 16 files changed, 59 insertions(+), 61 deletions(-) diff --git a/src/Magnum/GL/Test/CubeMapTextureArrayGLTest.cpp b/src/Magnum/GL/Test/CubeMapTextureArrayGLTest.cpp index 3f14a1640..cc26be1c1 100644 --- a/src/Magnum/GL/Test/CubeMapTextureArrayGLTest.cpp +++ b/src/Magnum/GL/Test/CubeMapTextureArrayGLTest.cpp @@ -412,8 +412,8 @@ void CubeMapTextureArrayGLTest::bindImage() { } template void CubeMapTextureArrayGLTest::sampling() { - setTestCaseName(std::is_same::value ? - "sampling" : "sampling"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/GL/Test/CubeMapTextureGLTest.cpp b/src/Magnum/GL/Test/CubeMapTextureGLTest.cpp index 1aa7275fb..56ca0e83a 100644 --- a/src/Magnum/GL/Test/CubeMapTextureGLTest.cpp +++ b/src/Magnum/GL/Test/CubeMapTextureGLTest.cpp @@ -445,8 +445,8 @@ void CubeMapTextureGLTest::bindImage() { #endif template void CubeMapTextureGLTest::sampling() { - setTestCaseName(std::is_same::value ? - "sampling" : "sampling"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "Sampler"); CubeMapTexture texture; texture.setMinificationFilter(T::Filter::Linear, T::Mipmap::Linear) diff --git a/src/Magnum/GL/Test/MeshGLTest.cpp b/src/Magnum/GL/Test/MeshGLTest.cpp index cc6a20411..8ffb0f5ee 100644 --- a/src/Magnum/GL/Test/MeshGLTest.cpp +++ b/src/Magnum/GL/Test/MeshGLTest.cpp @@ -442,9 +442,8 @@ void MeshGLTest::wrap() { } template void MeshGLTest::primitive() { - setTestCaseName(std::is_same::value ? - "primitive" : - "primitive"); + setTestCaseTemplateName(std::is_same::value ? + "GL::MeshPrimitive" : "Magnum::MeshPrimitive"); { Mesh mesh{T::LineLoop}; @@ -2034,9 +2033,8 @@ constexpr Color4ub indexedResult{0xaa, 0xcc, 0x44, 0xff}; #endif template void MeshGLTest::setIndexBuffer() { - setTestCaseName(std::is_same::value ? - "setIndexBuffer" : - "setIndexBuffer"); + setTestCaseTemplateName(std::is_same::value ? + "GL::MeshIndexType" : "Magnum::MeshIndexType"); Buffer vertices; vertices.setData(indexedVertexData, BufferUsage::StaticDraw); @@ -2067,9 +2065,8 @@ template void MeshGLTest::setIndexBuffer() { } template void MeshGLTest::setIndexBufferRange() { - setTestCaseName(std::is_same::value ? - "setIndexBufferRange" : - "setIndexBufferRange"); + setTestCaseTemplateName(std::is_same::value ? + "GL::MeshIndexType" : "Magnum::MeshIndexType"); Buffer vertices; vertices.setData(indexedVertexData, BufferUsage::StaticDraw); @@ -2146,9 +2143,8 @@ void MeshGLTest::setIndexBufferMovedOutInstance() { } template void MeshGLTest::setIndexBufferTransferOwnership() { - setTestCaseName(std::is_same::value ? - "setIndexBufferTransferOwnership" : - "setIndexBufferTransferOwnership"); + setTestCaseTemplateName(std::is_same::value ? + "GL::MeshIndexType" : "Magnum::MeshIndexType"); const UnsignedShort data = 0; Buffer buffer{Buffer::TargetHint::ElementArray}; @@ -2179,9 +2175,8 @@ template void MeshGLTest::setIndexBufferTransferOwnership() { } template void MeshGLTest::setIndexBufferRangeTransferOwnership() { - setTestCaseName(std::is_same::value ? - "setIndexBufferRangeTransferOwnership" : - "setIndexBufferRangeTransferOwnership"); + setTestCaseTemplateName(std::is_same::value ? + "GL::MeshIndexType" : "Magnum::MeshIndexType"); const UnsignedShort data = 0; Buffer buffer{Buffer::TargetHint::ElementArray}; diff --git a/src/Magnum/GL/Test/RectangleTextureGLTest.cpp b/src/Magnum/GL/Test/RectangleTextureGLTest.cpp index bc40d246a..e08868538 100644 --- a/src/Magnum/GL/Test/RectangleTextureGLTest.cpp +++ b/src/Magnum/GL/Test/RectangleTextureGLTest.cpp @@ -221,8 +221,8 @@ void RectangleTextureGLTest::bindImage() { } template void RectangleTextureGLTest::sampling() { - setTestCaseName(std::is_same::value ? - "sampling" : "sampling"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); if(!Context::current().isExtensionSupported()) CORRADE_SKIP(Extensions::ARB::texture_rectangle::string() + std::string(" is not supported.")); diff --git a/src/Magnum/GL/Test/TextureArrayGLTest.cpp b/src/Magnum/GL/Test/TextureArrayGLTest.cpp index f093d25a4..d051a02bf 100644 --- a/src/Magnum/GL/Test/TextureArrayGLTest.cpp +++ b/src/Magnum/GL/Test/TextureArrayGLTest.cpp @@ -555,8 +555,8 @@ void TextureArrayGLTest::bindImage2D() { #ifndef MAGNUM_TARGET_GLES template void TextureArrayGLTest::sampling1D() { - setTestCaseName(std::is_same::value ? - "sampling1D" : "sampling1D"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); if(!Context::current().isExtensionSupported()) CORRADE_SKIP(Extensions::EXT::texture_array::string() + std::string(" is not supported.")); @@ -632,8 +632,8 @@ void TextureArrayGLTest::samplingDepthStencilMode1D() { #endif template void TextureArrayGLTest::sampling2D() { - setTestCaseName(std::is_same::value ? - "sampling2D" : "sampling2D"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/GL/Test/TextureGLTest.cpp b/src/Magnum/GL/Test/TextureGLTest.cpp index 2aa642c83..61a8601f8 100644 --- a/src/Magnum/GL/Test/TextureGLTest.cpp +++ b/src/Magnum/GL/Test/TextureGLTest.cpp @@ -859,8 +859,8 @@ void TextureGLTest::bindImage3D() { #ifndef MAGNUM_TARGET_GLES template void TextureGLTest::sampling1D() { - setTestCaseName(std::is_same::value ? - "sampling1D" : "sampling1D"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); Texture1D texture; texture.setMinificationFilter(T::Filter::Linear, T::Mipmap::Linear) @@ -925,8 +925,8 @@ void TextureGLTest::samplingDepthStencilMode1D() { #endif template void TextureGLTest::sampling2D() { - setTestCaseName(std::is_same::value ? - "sampling2D" : "sampling2D"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); Texture2D texture; texture.setMinificationFilter(T::Filter::Linear, T::Mipmap::Linear) @@ -1061,8 +1061,8 @@ void TextureGLTest::samplingBorder2D() { #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) template void TextureGLTest::sampling3D() { - setTestCaseName(std::is_same::value ? - "sampling3D" : "sampling3D"); + setTestCaseTemplateName(std::is_same::value ? + "GenericSampler" : "GLSampler"); #ifdef MAGNUM_TARGET_GLES2 if(!Context::current().isExtensionSupported()) diff --git a/src/Magnum/Math/Algorithms/Test/SvdTest.cpp b/src/Magnum/Math/Algorithms/Test/SvdTest.cpp index 6a5fdbef0..5b707c65a 100644 --- a/src/Magnum/Math/Algorithms/Test/SvdTest.cpp +++ b/src/Magnum/Math/Algorithms/Test/SvdTest.cpp @@ -50,7 +50,7 @@ SvdTest::SvdTest() { } template void SvdTest::test() { - setTestCaseName(std::is_same::value ? "test" : "test"); + setTestCaseTemplateName(TypeTraits::name()); constexpr const Matrix5x8 a{ Vector8{T{22}, T{14}, T{ -1}, T{-3}, T{ 9}, T{ 9}, T{ 2}, T{ 4}}, diff --git a/src/Magnum/Math/Test/AngleTest.cpp b/src/Magnum/Math/Test/AngleTest.cpp index 69dc9fe2c..095612f43 100644 --- a/src/Magnum/Math/Test/AngleTest.cpp +++ b/src/Magnum/Math/Test/AngleTest.cpp @@ -289,7 +289,7 @@ void AngleTest::debugRad() { #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) template void AngleTest::tweakable() { auto&& data = TweakableData[testCaseInstanceId()]; - setTestCaseName(Corrade::Utility::formatString("tweakable<{}>", TweakableTraits::name())); + setTestCaseTemplateName(TweakableTraits::name()); setTestCaseDescription(data.name); std::string input = Corrade::Utility::formatString(data.data, TweakableTraits::literal()); Corrade::Utility::TweakableState state; @@ -301,7 +301,7 @@ template void AngleTest::tweakable() { template void AngleTest::tweakableError() { auto&& data = TweakableErrorData[testCaseInstanceId()]; - setTestCaseName(Corrade::Utility::formatString("tweakableError<{}>", TweakableTraits::name())); + setTestCaseTemplateName(TweakableTraits::name()); setTestCaseDescription(data.name); std::string input = Corrade::Utility::formatString(data.data, TweakableTraits::literal()); diff --git a/src/Magnum/Math/Test/ComplexTest.cpp b/src/Magnum/Math/Test/ComplexTest.cpp index 76353782a..cbc56c0da 100644 --- a/src/Magnum/Math/Test/ComplexTest.cpp +++ b/src/Magnum/Math/Test/ComplexTest.cpp @@ -304,7 +304,7 @@ void ComplexTest::isNormalized() { } template void ComplexTest::isNormalizedEpsilon() { - setTestCaseName(std::string{"isNormalizedEpsilon<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY((Math::Complex{T(0.801775644243754) + TypeTraits::epsilon()/T(2.0), T(0.597625146975521)}.isNormalized())); CORRADE_VERIFY(!(Math::Complex{T(0.801775644243754) + TypeTraits::epsilon()*T(2.0), T(0.597625146975521)}.isNormalized())); @@ -381,7 +381,7 @@ void ComplexTest::normalized() { } template void ComplexTest::normalizedIterative() { - setTestCaseName(std::string{"normalizedIterative<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); auto a = Math::Complex::rotation(Math::Deg{T(36.7)}); for(std::size_t i = 0; i != testCaseRepeatId(); ++i) { diff --git a/src/Magnum/Math/Test/ConstantsTest.cpp b/src/Magnum/Math/Test/ConstantsTest.cpp index 49444ed24..786754cea 100644 --- a/src/Magnum/Math/Test/ConstantsTest.cpp +++ b/src/Magnum/Math/Test/ConstantsTest.cpp @@ -46,7 +46,7 @@ ConstantsTest::ConstantsTest() { } template void ConstantsTest::constants() { - setTestCaseName(std::is_same::value ? "constants" : "constants"); + setTestCaseTemplateName(TypeTraits::name()); { constexpr T a = Constants::sqrt2(); @@ -70,7 +70,7 @@ template void ConstantsTest::constants() { } template void ConstantsTest::specials() { - setTestCaseName(std::is_same::value ? "specials" : "specials"); + setTestCaseTemplateName(TypeTraits::name()); #ifndef CORRADE_MSVC2015_COMPATIBILITY /* NaN is not constexpr */ constexpr diff --git a/src/Magnum/Math/Test/DualComplexTest.cpp b/src/Magnum/Math/Test/DualComplexTest.cpp index 3c58b61ae..cde9029cf 100644 --- a/src/Magnum/Math/Test/DualComplexTest.cpp +++ b/src/Magnum/Math/Test/DualComplexTest.cpp @@ -285,14 +285,14 @@ void DualComplexTest::isNormalized() { } template void DualComplexTest::isNormalizedEpsilonRotation() { - setTestCaseName(std::string{"isNormalizedEpsilonRotation<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY((Math::DualComplex{{T(0.801775644243754) + TypeTraits::epsilon()/T(2.0), T(0.597625146975521)}, {T(8018055.25501103), T(5975850.58193309)}}.isNormalized())); CORRADE_VERIFY(!(Math::DualComplex{{T(0.801775644243754) + TypeTraits::epsilon()*T(2.0), T(0.597625146975521)}, {T(8018055.25501103), T(5975850.58193309)}}.isNormalized())); } template void DualComplexTest::isNormalizedEpsilonTranslation() { - setTestCaseName(std::string{"isNormalizedEpsilonTranslation<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); /* Translation does not affect normalization */ CORRADE_VERIFY((Math::DualComplex{{T(0.801775644243754), T(0.597625146975521)}, {T(8018055.25501103), T(20.5)}}.isNormalized())); @@ -331,7 +331,7 @@ template<> struct NormalizedIterativeData { }; template void DualComplexTest::normalizedIterative() { - setTestCaseName(std::string{"normalizedIterative<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); auto a = Math::DualComplex::rotation(Math::Deg{T(36.7)})*Math::DualComplex::translation(NormalizedIterativeData::translation()); for(std::size_t i = 0; i != testCaseRepeatId(); ++i) { diff --git a/src/Magnum/Math/Test/DualQuaternionTest.cpp b/src/Magnum/Math/Test/DualQuaternionTest.cpp index 4d92ce739..7978e21d6 100644 --- a/src/Magnum/Math/Test/DualQuaternionTest.cpp +++ b/src/Magnum/Math/Test/DualQuaternionTest.cpp @@ -318,14 +318,14 @@ void DualQuaternionTest::isNormalized() { } template void DualQuaternionTest::isNormalizedEpsilonRotation() { - setTestCaseName(std::string{"isNormalizedEpsilonRotation<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY((Math::DualQuaternion{{{T(0.199367934417197) + TypeTraits::epsilon()/T(2.0), T(0.0), T(0.0)}, T(0.97992470462083)}, {{T(0.440966117079373), T(-0.440120368706115), T(-0.344665143363806)}, T(-0.0897155704877387)}}.isNormalized())); CORRADE_VERIFY(!(Math::DualQuaternion{{{T(0.199367934417197), T(0.0), T(0.0)}, T(0.97992470462083) + TypeTraits::epsilon()*T(2.0)}, {{T(0.440966117079373), T(-0.440120368706115), T(-0.344665143363806)}, T(-0.0897155704877387)}}.isNormalized())); } template void DualQuaternionTest::isNormalizedEpsilonTranslation() { - setTestCaseName(std::string{"isNormalizedEpsilonTranslation<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY((Math::DualQuaternion{{{T(0.199367934417197), T(0.0), T(0.0)}, T(0.97992470462083)}, {{T(0.440966117079373), T(-0.440120368706115) + TypeTraits::epsilon()*T(2.0), T(-0.344665143363806)}, T(-0.0897155704877387)}}.isNormalized())); CORRADE_VERIFY(!(Math::DualQuaternion{{{T(0.199367934417197), T(0.0), T(0.0)}, T(0.97992470462083)}, {{T(0.440966117079373) + TypeTraits::epsilon()*T(4.0), T(-0.440120368706115), T(-0.344665143363806)}, T(-0.0897155704877387)}}.isNormalized())); @@ -361,7 +361,7 @@ template<> struct NormalizedIterativeData { }; template void DualQuaternionTest::normalizedIterative() { - setTestCaseName(std::string{"normalizedIterative<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); const auto axis = Math::Vector3{T(0.5), T(7.9), T(0.1)}.normalized(); auto a = Math::DualQuaternion::rotation(Math::Deg{T(36.7)}, Math::Vector3{T(0.25), T(7.3), T(-1.1)}.normalized())*Math::DualQuaternion::translation(NormalizedIterativeData::translation()); diff --git a/src/Magnum/Math/Test/QuaternionTest.cpp b/src/Magnum/Math/Test/QuaternionTest.cpp index bf989c7f5..b0b350077 100644 --- a/src/Magnum/Math/Test/QuaternionTest.cpp +++ b/src/Magnum/Math/Test/QuaternionTest.cpp @@ -329,7 +329,7 @@ void QuaternionTest::isNormalized() { } template void QuaternionTest::isNormalizedEpsilon() { - setTestCaseName(std::string{"isNormalizedEpsilon<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY((Math::Quaternion{{T(0.0106550719778129), T(0.311128101752138), T(-0.0468823167023769)}, T(0.949151106053128) + TypeTraits::epsilon()/T(2.0)}.isNormalized())); CORRADE_VERIFY(!(Math::Quaternion{{T(0.0106550719778129), T(0.311128101752138), T(-0.0468823167023769)}, T(0.949151106053128) + TypeTraits::epsilon()*T(2.0)}.isNormalized())); @@ -404,7 +404,7 @@ void QuaternionTest::normalized() { } template void QuaternionTest::normalizedIterative() { - setTestCaseName(std::string{"normalizedIterative<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); const auto axis = Math::Vector3{T(0.5), T(7.9), T(0.1)}.normalized(); auto a = Math::Quaternion::rotation(Math::Deg{T(36.7)}, Math::Vector3{T(0.25), T(7.3), T(-1.1)}.normalized()); diff --git a/src/Magnum/Math/Test/StrictWeakOrderingTest.cpp b/src/Magnum/Math/Test/StrictWeakOrderingTest.cpp index 1b91e46a1..dce0f7ba3 100644 --- a/src/Magnum/Math/Test/StrictWeakOrderingTest.cpp +++ b/src/Magnum/Math/Test/StrictWeakOrderingTest.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include "Magnum/Math/Vector2.h" #include "Magnum/Math/StrictWeakOrdering.h" @@ -85,7 +84,7 @@ template<> struct Compare> { }; template void StrictWeakOrderingTest::set() { - setTestCaseName(Corrade::Utility::formatString("set<{}>", Compare::name())); + setTestCaseTemplateName(Compare::name()); Set s; s.insert({1, 2}); @@ -100,7 +99,7 @@ template void StrictWeakOrderingTest::set() { } template void StrictWeakOrderingTest::map() { - setTestCaseName(Corrade::Utility::formatString("map<{}>", Compare::name())); + setTestCaseTemplateName(Compare::name()); Map m; m[{1, 2}] = 23; diff --git a/src/Magnum/Math/Test/TypeTraitsTest.cpp b/src/Magnum/Math/Test/TypeTraitsTest.cpp index 2f11234e1..cab9d75b7 100644 --- a/src/Magnum/Math/Test/TypeTraitsTest.cpp +++ b/src/Magnum/Math/Test/TypeTraitsTest.cpp @@ -248,7 +248,7 @@ void TypeTraitsTest::underlyingTypeOf() { } template void TypeTraitsTest::equalsIntegral() { - setTestCaseName(std::string{"equalsIntegral<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY(TypeTraits::equals(T(1), T(1))); CORRADE_VERIFY(!TypeTraits::equals(T(1), T(-1))); @@ -256,35 +256,35 @@ template void TypeTraitsTest::equalsIntegral() { } template void TypeTraitsTest::equalsFloatingPoint0() { - setTestCaseName(std::string{"equalsFloatingPoint0<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY(TypeTraits::equals(T(0)+TypeTraits::epsilon()/T(2), T(0))); CORRADE_VERIFY(!TypeTraits::equals(T(0)+TypeTraits::epsilon()*T(2), T(0))); } template void TypeTraitsTest::equalsFloatingPoint1() { - setTestCaseName(std::string{"equalsFloatingPoint1<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY(TypeTraits::equals(T(1)+TypeTraits::epsilon()/T(2), T(1))); CORRADE_VERIFY(!TypeTraits::equals(T(1)+TypeTraits::epsilon()*T(3), T(1))); } template void TypeTraitsTest::equalsFloatingPointLarge() { - setTestCaseName(std::string{"equalsFloatingPointLarge<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY(TypeTraits::equals(T(25)+TypeTraits::epsilon()*T(2), T(25))); CORRADE_VERIFY(!TypeTraits::equals(T(25)+TypeTraits::epsilon()*T(75), T(25))); } template void TypeTraitsTest::equalsFloatingPointInfinity() { - setTestCaseName(std::string{"equalsFloatingPointInfinity<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY(TypeTraits::equals(Constants::inf(), Constants::inf())); } template void TypeTraitsTest::equalsFloatingPointNaN() { - setTestCaseName(std::string{"equalsFloatingPointNaN<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); CORRADE_VERIFY(!TypeTraits::equals(Constants::nan(), Constants::nan())); @@ -299,7 +299,7 @@ template void TypeTraitsTest::equalsZeroIntegral() { - setTestCaseName(std::string{"equalsZeroIntegral<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); const T a = T(-123); const T magnitude = abs(a); @@ -310,7 +310,7 @@ template void TypeTraitsTest::equalsZeroIntegral() { } template void TypeTraitsTest::equalsZeroFloatingPoint() { - setTestCaseName(std::string{"equalsZeroFloatingPoint<"} + TypeTraits::name() + ">"); + setTestCaseTemplateName(TypeTraits::name()); setTestCaseDescription(EqualsZeroData[testCaseInstanceId()].name); const T a = EqualsZeroData[testCaseInstanceId()].get(T{}); diff --git a/src/Magnum/Shaders/Test/FlatGLTest.cpp b/src/Magnum/Shaders/Test/FlatGLTest.cpp index fb641fddd..42342cfc9 100644 --- a/src/Magnum/Shaders/Test/FlatGLTest.cpp +++ b/src/Magnum/Shaders/Test/FlatGLTest.cpp @@ -80,7 +80,7 @@ FlatGLTest::FlatGLTest() { } template void FlatGLTest::construct() { - setTestCaseName(Utility::formatString("construct<{}>", dimensions)); + setTestCaseTemplateName(std::to_string(dimensions)); auto&& data = ConstructData[testCaseInstanceId()]; setTestCaseDescription(data.name); @@ -97,7 +97,7 @@ template void FlatGLTest::construct() { } template void FlatGLTest::constructMove() { - setTestCaseName(Utility::formatString("constructMove<{}>", dimensions)); + setTestCaseTemplateName(std::to_string(dimensions)); Flat a{Flat::Flag::Textured}; const GLuint id = a.id(); @@ -118,7 +118,7 @@ template void FlatGLTest::constructMove() { } template void FlatGLTest::bindTexture() { - setTestCaseName(Utility::formatString("bindTexture<{}>", dimensions)); + setTestCaseTemplateName(std::to_string(dimensions)); char data[4]; @@ -139,7 +139,7 @@ template void FlatGLTest::bindTexture() { } template void FlatGLTest::bindTextureNotEnabled() { - setTestCaseName(Utility::formatString("bindTextureNotEnabled<{}>", dimensions)); + setTestCaseTemplateName(std::to_string(dimensions)); std::ostringstream out; Error redirectError{&out}; @@ -152,6 +152,8 @@ template void FlatGLTest::bindTextureNotEnabled() { } template void FlatGLTest::setAlphaMask() { + setTestCaseTemplateName(std::to_string(dimensions)); + /* Test just that no assertion is fired */ Flat shader{Flat::Flag::AlphaMask}; shader.setAlphaMask(0.25f); @@ -160,6 +162,8 @@ template void FlatGLTest::setAlphaMask() { } template void FlatGLTest::setAlphaMaskNotEnabled() { + setTestCaseTemplateName(std::to_string(dimensions)); + std::ostringstream out; Error redirectError{&out};