diff --git a/src/Magnum/Trade/Test/FlatMaterialDataTest.cpp b/src/Magnum/Trade/Test/FlatMaterialDataTest.cpp index b25d3bd0c..143be2c71 100644 --- a/src/Magnum/Trade/Test/FlatMaterialDataTest.cpp +++ b/src/Magnum/Trade/Test/FlatMaterialDataTest.cpp @@ -33,21 +33,20 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class FlatMaterialDataTest: public TestSuite::Tester { - public: - explicit FlatMaterialDataTest(); - - void baseColor(); - void diffuseColor(); - void defaults(); - void texturedBaseColor(); - void texturedDiffuseColor(); - void texturedDefaults(); - void texturedBaseColorSingleMatrixCoordinatesLayer(); - void texturedDiffuseColorSingleMatrixCoordinatesLayer(); - void texturedMismatchedMatrixCoordinatesLayer(); - void texturedImplicitCoordinatesLayer(); - void invalidTextures(); +struct FlatMaterialDataTest: TestSuite::Tester { + explicit FlatMaterialDataTest(); + + void baseColor(); + void diffuseColor(); + void defaults(); + void texturedBaseColor(); + void texturedDiffuseColor(); + void texturedDefaults(); + void texturedBaseColorSingleMatrixCoordinatesLayer(); + void texturedDiffuseColorSingleMatrixCoordinatesLayer(); + void texturedMismatchedMatrixCoordinatesLayer(); + void texturedImplicitCoordinatesLayer(); + void invalidTextures(); }; FlatMaterialDataTest::FlatMaterialDataTest() { diff --git a/src/Magnum/Trade/Test/MaterialDataTest.cpp b/src/Magnum/Trade/Test/MaterialDataTest.cpp index 179ffdba0..5e58fa443 100644 --- a/src/Magnum/Trade/Test/MaterialDataTest.cpp +++ b/src/Magnum/Trade/Test/MaterialDataTest.cpp @@ -43,133 +43,132 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class MaterialDataTest: public TestSuite::Tester { - public: - explicit MaterialDataTest(); - - void textureSwizzleComponentCount(); - void attributeTypeSize(); - void attributeTypeSizeInvalid(); - - void attributeMap(); - void layerMap(); - - void constructAttributeDefault(); - void constructAttributeString(); - void constructAttributeName(); - void constructAttributeTypeErasedString(); - void constructAttributeTypeErasedName(); - - template void constructAttributeStringConstexpr(); - - void constructAttributePointer(); - void constructAttributeMutablePointer(); - void constructAttributeStringNameStringValue(); - void constructAttributeNameStringValue(); - void constructAttributeTextureSwizzle(); - void constructAttributeLayer(); - - void constructAttributeInvalidName(); - void constructAttributeInvalidLayerName(); - void constructAttributeWrongTypeForName(); - void constructAttributeInvalidType(); - void constructAttributeEmptyName(); - void constructAttributeEmptyNameString(); - void constructAttributeTooLarge(); - void constructAttributeTooLargeString(); - void constructAttributeTooLargeNameString(); - void constructAttributeWrongAccessType(); - void constructAttributeWrongAccessPointerType(); - void constructAttributeWrongAccessTypeString(); - - void construct(); - void constructEmptyAttribute(); - void constructDuplicateAttribute(); - void constructFromImmutableSortedArray(); - - void constructLayers(); - void constructLayersNotMonotonic(); - void constructLayersOffsetOutOfBounds(); - - void constructNonOwned(); - void constructNonOwnedLayers(); - void constructNonOwnedEmptyAttribute(); - void constructNonOwnedNotSorted(); - void constructNonOwnedDuplicateAttribute(); - void constructNonOwnedLayersNotMonotonic(); - void constructNonOwnedLayersOffsetOutOfBounds(); - void constructNonOwnedAttributeFlagOwned(); - void constructNonOwnedLayerFlagOwned(); - - void constructCopy(); - void constructMove(); - - void as(); - void asRvalue(); - - void access(); - void accessPointer(); - void accessString(); - void accessTextureSwizzle(); - void accessMutable(); - void accessOptional(); - void accessOutOfBounds(); - void accessNotFound(); - void accessInvalidAttributeName(); - void accessWrongType(); - void accessWrongPointerType(); - void accessWrongTypeString(); - - void accessLayers(); - void accessLayersDefaults(); - void accessLayersTextured(); - void accessLayersTexturedDefault(); - void accessLayersTexturedSingleMatrixCoordinatesLayer(); - void accessLayersTexturedBaseMaterialMatrixCoordinatesLayer(); - void accessLayersInvalidTextures(); - - void accessLayerLayerNameInBaseMaterial(); - void accessLayerEmptyLayer(); - void accessLayerIndexMutable(); - void accessLayerNameMutable(); - void accessLayerStringMutable(); - void accessLayerIndexOptional(); - void accessLayerNameOptional(); - void accessLayerStringOptional(); - void accessLayerOutOfBounds(); - void accessLayerNotFound(); - void accessInvalidLayerName(); - void accessOutOfBoundsInLayerIndex(); - void accessOutOfBoundsInLayerString(); - void accessNotFoundInLayerIndex(); - void accessNotFoundInLayerString(); - void accessMutableNotAllowed(); - - void releaseAttributes(); - void releaseLayers(); - - void templateLayerAccess(); - void templateLayerAccessMutable(); - - void debugLayer(); - /* No packed version, as layer name is stored as a string */ - void debugAttribute(); - /* No packed version, as attribute name is stored as a string */ - void debugTextureSwizzle(); - void debugTextureSwizzlePacked(); - void debugAttributeType(); - void debugAttributeTypePacked(); - - void debugType(); - void debugTypePacked(); - void debugTypes(); - void debugTypesPacked(); - #ifdef MAGNUM_BUILD_DEPRECATED - void debugFlag(); - void debugFlags(); - #endif - void debugAlphaMode(); - void debugAlphaModePacked(); +struct MaterialDataTest: TestSuite::Tester { + explicit MaterialDataTest(); + + void textureSwizzleComponentCount(); + void attributeTypeSize(); + void attributeTypeSizeInvalid(); + + void attributeMap(); + void layerMap(); + + void constructAttributeDefault(); + void constructAttributeString(); + void constructAttributeName(); + void constructAttributeTypeErasedString(); + void constructAttributeTypeErasedName(); + + template void constructAttributeStringConstexpr(); + + void constructAttributePointer(); + void constructAttributeMutablePointer(); + void constructAttributeStringNameStringValue(); + void constructAttributeNameStringValue(); + void constructAttributeTextureSwizzle(); + void constructAttributeLayer(); + + void constructAttributeInvalidName(); + void constructAttributeInvalidLayerName(); + void constructAttributeWrongTypeForName(); + void constructAttributeInvalidType(); + void constructAttributeEmptyName(); + void constructAttributeEmptyNameString(); + void constructAttributeTooLarge(); + void constructAttributeTooLargeString(); + void constructAttributeTooLargeNameString(); + void constructAttributeWrongAccessType(); + void constructAttributeWrongAccessPointerType(); + void constructAttributeWrongAccessTypeString(); + + void construct(); + void constructEmptyAttribute(); + void constructDuplicateAttribute(); + void constructFromImmutableSortedArray(); + + void constructLayers(); + void constructLayersNotMonotonic(); + void constructLayersOffsetOutOfBounds(); + + void constructNonOwned(); + void constructNonOwnedLayers(); + void constructNonOwnedEmptyAttribute(); + void constructNonOwnedNotSorted(); + void constructNonOwnedDuplicateAttribute(); + void constructNonOwnedLayersNotMonotonic(); + void constructNonOwnedLayersOffsetOutOfBounds(); + void constructNonOwnedAttributeFlagOwned(); + void constructNonOwnedLayerFlagOwned(); + + void constructCopy(); + void constructMove(); + + void as(); + void asRvalue(); + + void access(); + void accessPointer(); + void accessString(); + void accessTextureSwizzle(); + void accessMutable(); + void accessOptional(); + void accessOutOfBounds(); + void accessNotFound(); + void accessInvalidAttributeName(); + void accessWrongType(); + void accessWrongPointerType(); + void accessWrongTypeString(); + + void accessLayers(); + void accessLayersDefaults(); + void accessLayersTextured(); + void accessLayersTexturedDefault(); + void accessLayersTexturedSingleMatrixCoordinatesLayer(); + void accessLayersTexturedBaseMaterialMatrixCoordinatesLayer(); + void accessLayersInvalidTextures(); + + void accessLayerLayerNameInBaseMaterial(); + void accessLayerEmptyLayer(); + void accessLayerIndexMutable(); + void accessLayerNameMutable(); + void accessLayerStringMutable(); + void accessLayerIndexOptional(); + void accessLayerNameOptional(); + void accessLayerStringOptional(); + void accessLayerOutOfBounds(); + void accessLayerNotFound(); + void accessInvalidLayerName(); + void accessOutOfBoundsInLayerIndex(); + void accessOutOfBoundsInLayerString(); + void accessNotFoundInLayerIndex(); + void accessNotFoundInLayerString(); + void accessMutableNotAllowed(); + + void releaseAttributes(); + void releaseLayers(); + + void templateLayerAccess(); + void templateLayerAccessMutable(); + + void debugLayer(); + /* No packed version, as layer name is stored as a string */ + void debugAttribute(); + /* No packed version, as attribute name is stored as a string */ + void debugTextureSwizzle(); + void debugTextureSwizzlePacked(); + void debugAttributeType(); + void debugAttributeTypePacked(); + + void debugType(); + void debugTypePacked(); + void debugTypes(); + void debugTypesPacked(); + #ifdef MAGNUM_BUILD_DEPRECATED + void debugFlag(); + void debugFlags(); + #endif + void debugAlphaMode(); + void debugAlphaModePacked(); }; MaterialDataTest::MaterialDataTest() { diff --git a/src/Magnum/Trade/Test/ObjectData2DTest.cpp b/src/Magnum/Trade/Test/ObjectData2DTest.cpp index c933552d8..bc3718373 100644 --- a/src/Magnum/Trade/Test/ObjectData2DTest.cpp +++ b/src/Magnum/Trade/Test/ObjectData2DTest.cpp @@ -34,24 +34,23 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class ObjectData2DTest: public TestSuite::Tester { - public: - explicit ObjectData2DTest(); - - void constructEmpty(); - void constructEmptyTransformations(); - void constructMesh(); - void constructMeshTransformations(); - void constructCamera(); - void constructCopy(); - void constructMoveTransformations(); - void constructMoveMesh(); - - void accessInvalidTransformations(); - - void debugType(); - void debugFlag(); - void debugFlags(); +struct ObjectData2DTest: TestSuite::Tester { + explicit ObjectData2DTest(); + + void constructEmpty(); + void constructEmptyTransformations(); + void constructMesh(); + void constructMeshTransformations(); + void constructCamera(); + void constructCopy(); + void constructMoveTransformations(); + void constructMoveMesh(); + + void accessInvalidTransformations(); + + void debugType(); + void debugFlag(); + void debugFlags(); }; CORRADE_IGNORE_DEPRECATED_PUSH diff --git a/src/Magnum/Trade/Test/ObjectData3DTest.cpp b/src/Magnum/Trade/Test/ObjectData3DTest.cpp index e01b1defb..8da45ca40 100644 --- a/src/Magnum/Trade/Test/ObjectData3DTest.cpp +++ b/src/Magnum/Trade/Test/ObjectData3DTest.cpp @@ -34,25 +34,24 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class ObjectData3DTest: public TestSuite::Tester { - public: - explicit ObjectData3DTest(); - - void constructEmpty(); - void constructEmptyTransformations(); - void constructMesh(); - void constructMeshTransformations(); - void constructCamera(); - void constructLight(); - void constructCopy(); - void constructMoveTransformations(); - void constructMoveMesh(); - - void accessInvalidTransformations(); - - void debugType(); - void debugFlag(); - void debugFlags(); +struct ObjectData3DTest: TestSuite::Tester { + explicit ObjectData3DTest(); + + void constructEmpty(); + void constructEmptyTransformations(); + void constructMesh(); + void constructMeshTransformations(); + void constructCamera(); + void constructLight(); + void constructCopy(); + void constructMoveTransformations(); + void constructMoveMesh(); + + void accessInvalidTransformations(); + + void debugType(); + void debugFlag(); + void debugFlags(); }; ObjectData3DTest::ObjectData3DTest() { diff --git a/src/Magnum/Trade/Test/PbrClearCoatMaterialDataTest.cpp b/src/Magnum/Trade/Test/PbrClearCoatMaterialDataTest.cpp index 6390fc61b..4afb90e26 100644 --- a/src/Magnum/Trade/Test/PbrClearCoatMaterialDataTest.cpp +++ b/src/Magnum/Trade/Test/PbrClearCoatMaterialDataTest.cpp @@ -32,23 +32,22 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class PbrClearCoatMaterialDataTest: public TestSuite::Tester { - public: - explicit PbrClearCoatMaterialDataTest(); - - void basics(); - void defaults(); - void textured(); - void texturedDefaults(); - void texturedExplicitPackedLayerFactorRoughness(); - void texturedSingleMatrixCoordinatesLayer(); - void texturedBaseMaterialMatrixCoordinatesLayer(); - void invalidTextures(); - void commonTransformationCoordinatesLayerNoTextures(); - void commonTransformationCoordinatesLayerOneTexture(); - void commonTransformationCoordinatesLayerOneDifferentTexture(); - void commonCoordinatesLayerImplicit(); - void noCommonTransformationCoordinatesLayer(); +struct PbrClearCoatMaterialDataTest: TestSuite::Tester { + explicit PbrClearCoatMaterialDataTest(); + + void basics(); + void defaults(); + void textured(); + void texturedDefaults(); + void texturedExplicitPackedLayerFactorRoughness(); + void texturedSingleMatrixCoordinatesLayer(); + void texturedBaseMaterialMatrixCoordinatesLayer(); + void invalidTextures(); + void commonTransformationCoordinatesLayerNoTextures(); + void commonTransformationCoordinatesLayerOneTexture(); + void commonTransformationCoordinatesLayerOneDifferentTexture(); + void commonCoordinatesLayerImplicit(); + void noCommonTransformationCoordinatesLayer(); }; const Containers::StringView PbrClearCoatTextureData[] { diff --git a/src/Magnum/Trade/Test/PbrMetallicRoughnessMaterialDataTest.cpp b/src/Magnum/Trade/Test/PbrMetallicRoughnessMaterialDataTest.cpp index d5ab2c420..366cf3b61 100644 --- a/src/Magnum/Trade/Test/PbrMetallicRoughnessMaterialDataTest.cpp +++ b/src/Magnum/Trade/Test/PbrMetallicRoughnessMaterialDataTest.cpp @@ -34,26 +34,25 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class PbrMetallicRoughnessMaterialDataTest: public TestSuite::Tester { - public: - explicit PbrMetallicRoughnessMaterialDataTest(); - - void basics(); - void defaults(); - void textured(); - void texturedDefaults(); - void texturedImplicitPackedMetallicRoughness(); - void texturedExplicitPackedMetallicRoughness(); - void texturedExplicitPackedRoughnessMetallicOcclusion(); - void texturedExplicitPackedOcclusionRoughnessMetallic(); - void texturedExplicitPackedNormalRoughnessMetallic(); - void texturedSingleMatrixCoordinatesLayer(); - void invalidTextures(); - void commonTransformationCoordinatesLayerNoTextures(); - void commonTransformationCoordinatesLayerOneTexture(); - void commonTransformationCoordinatesLayerOneDifferentTexture(); - void commonCoordinatesLayerImplicit(); - void noCommonTransformationCoordinatesLayer(); +struct PbrMetallicRoughnessMaterialDataTest: TestSuite::Tester { + explicit PbrMetallicRoughnessMaterialDataTest(); + + void basics(); + void defaults(); + void textured(); + void texturedDefaults(); + void texturedImplicitPackedMetallicRoughness(); + void texturedExplicitPackedMetallicRoughness(); + void texturedExplicitPackedRoughnessMetallicOcclusion(); + void texturedExplicitPackedOcclusionRoughnessMetallic(); + void texturedExplicitPackedNormalRoughnessMetallic(); + void texturedSingleMatrixCoordinatesLayer(); + void invalidTextures(); + void commonTransformationCoordinatesLayerNoTextures(); + void commonTransformationCoordinatesLayerOneTexture(); + void commonTransformationCoordinatesLayerOneDifferentTexture(); + void commonCoordinatesLayerImplicit(); + void noCommonTransformationCoordinatesLayer(); }; const Containers::StringView PbrMetallicRoughnessTextureData[] { diff --git a/src/Magnum/Trade/Test/PbrSpecularGlossinessMaterialDataTest.cpp b/src/Magnum/Trade/Test/PbrSpecularGlossinessMaterialDataTest.cpp index d9eb1649f..804210fca 100644 --- a/src/Magnum/Trade/Test/PbrSpecularGlossinessMaterialDataTest.cpp +++ b/src/Magnum/Trade/Test/PbrSpecularGlossinessMaterialDataTest.cpp @@ -34,23 +34,22 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class PbrSpecularGlossinessMaterialDataTest: public TestSuite::Tester { - public: - explicit PbrSpecularGlossinessMaterialDataTest(); - - void basics(); - void defaults(); - void textured(); - void texturedDefaults(); - void texturedImplicitPackedSpecularGlossiness(); - void texturedExplicitPackedSpecularGlossiness(); - void texturedSingleMatrixCoordinatesLayer(); - void invalidTextures(); - void commonTransformationCoordinatesLayerNoTextures(); - void commonTransformationCoordinatesLayerOneTexture(); - void commonTransformationCoordinatesLayerOneDifferentTexture(); - void commonCoordinatesLayerImplicit(); - void noCommonTransformationCoordinatesLayer(); +struct PbrSpecularGlossinessMaterialDataTest: TestSuite::Tester { + explicit PbrSpecularGlossinessMaterialDataTest(); + + void basics(); + void defaults(); + void textured(); + void texturedDefaults(); + void texturedImplicitPackedSpecularGlossiness(); + void texturedExplicitPackedSpecularGlossiness(); + void texturedSingleMatrixCoordinatesLayer(); + void invalidTextures(); + void commonTransformationCoordinatesLayerNoTextures(); + void commonTransformationCoordinatesLayerOneTexture(); + void commonTransformationCoordinatesLayerOneDifferentTexture(); + void commonCoordinatesLayerImplicit(); + void noCommonTransformationCoordinatesLayer(); }; const Containers::StringView PbrSpecularGlossinessTextureData[] { diff --git a/src/Magnum/Trade/Test/PhongMaterialDataTest.cpp b/src/Magnum/Trade/Test/PhongMaterialDataTest.cpp index 6bc5f7458..c9a4cbeb2 100644 --- a/src/Magnum/Trade/Test/PhongMaterialDataTest.cpp +++ b/src/Magnum/Trade/Test/PhongMaterialDataTest.cpp @@ -34,37 +34,36 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class PhongMaterialDataTest: public TestSuite::Tester { - public: - explicit PhongMaterialDataTest(); +struct PhongMaterialDataTest: TestSuite::Tester { + explicit PhongMaterialDataTest(); - #ifdef MAGNUM_BUILD_DEPRECATED - void constructDeprecated(); - void constructDeprecatedTextured(); - void constructDeprecatedTexturedTextureTransform(); - void constructDeprecatedTexturedCoordinates(); - void constructDeprecatedTextureTransformNoTextures(); - void constructDeprecatedNoTextureTransformationFlag(); - void constructDeprecatedNoTextureCoordinatesFlag(); - #endif + #ifdef MAGNUM_BUILD_DEPRECATED + void constructDeprecated(); + void constructDeprecatedTextured(); + void constructDeprecatedTexturedTextureTransform(); + void constructDeprecatedTexturedCoordinates(); + void constructDeprecatedTextureTransformNoTextures(); + void constructDeprecatedNoTextureTransformationFlag(); + void constructDeprecatedNoTextureCoordinatesFlag(); + #endif - void basics(); - void defaults(); - void textured(); - void texturedDefaults(); - void texturedSingleMatrixCoordinatesLayer(); - void texturedImplicitPackedSpecularGlossiness(); - void invalidTextures(); - void commonTransformationCoordinatesLayerNoTextures(); - void commonTransformationCoordinatesLayerOneTexture(); - void commonTransformationCoordinatesLayerOneDifferentTexture(); - void commonCoordinatesLayerImplicit(); - void noCommonTransformationCoordinatesLayer(); + void basics(); + void defaults(); + void textured(); + void texturedDefaults(); + void texturedSingleMatrixCoordinatesLayer(); + void texturedImplicitPackedSpecularGlossiness(); + void invalidTextures(); + void commonTransformationCoordinatesLayerNoTextures(); + void commonTransformationCoordinatesLayerOneTexture(); + void commonTransformationCoordinatesLayerOneDifferentTexture(); + void commonCoordinatesLayerImplicit(); + void noCommonTransformationCoordinatesLayer(); - #ifdef MAGNUM_BUILD_DEPRECATED - void debugFlag(); - void debugFlags(); - #endif + #ifdef MAGNUM_BUILD_DEPRECATED + void debugFlag(); + void debugFlags(); + #endif }; const Containers::StringView PhongTextureData[] { diff --git a/src/Magnum/Trade/Test/TextureDataTest.cpp b/src/Magnum/Trade/Test/TextureDataTest.cpp index 925b0ada7..0a13a68bd 100644 --- a/src/Magnum/Trade/Test/TextureDataTest.cpp +++ b/src/Magnum/Trade/Test/TextureDataTest.cpp @@ -31,16 +31,15 @@ namespace Magnum { namespace Trade { namespace Test { namespace { -class TextureDataTest: public TestSuite::Tester { - public: - explicit TextureDataTest(); +struct TextureDataTest: TestSuite::Tester { + explicit TextureDataTest(); - void construct(); - void constructCopy(); - void constructMove(); + void construct(); + void constructCopy(); + void constructMove(); - void debugType(); - void debugTypePacked(); + void debugType(); + void debugTypePacked(); }; TextureDataTest::TextureDataTest() {