diff --git a/src/Magnum/DebugTools/Test/CompareMaterialTest.cpp b/src/Magnum/DebugTools/Test/CompareMaterialTest.cpp index 70276412f..680035d7d 100644 --- a/src/Magnum/DebugTools/Test/CompareMaterialTest.cpp +++ b/src/Magnum/DebugTools/Test/CompareMaterialTest.cpp @@ -160,6 +160,40 @@ const struct { " + NormalTextureLayer @ UnsignedInt: 2\n" " - NormalTextureScale @ Float: 0.5\n" " - OcclusionTexture @ UnsignedInt: 3\n"}, + {"different attributes, empty base layer", + /* Same as above, except everything is in the second layer to verify + we're not accidentally checking just the first layer */ + Trade::MaterialData{Trade::MaterialType::PbrMetallicRoughness, { + {Trade::MaterialAttribute::DoubleSided, true}, + {Trade::MaterialAttribute::NormalTexture, 5u}, + {Trade::MaterialAttribute::NormalTextureScale, 0.5f}, + {Trade::MaterialAttribute::OcclusionTexture, 3u}, + }, {0, 4}}, + Trade::MaterialData{Trade::MaterialType::PbrMetallicRoughness, { + {Trade::MaterialAttribute::Metalness, 5.5f}, + {Trade::MaterialAttribute::NormalTexture, 5u}, + {Trade::MaterialAttribute::NormalTextureLayer, 2u}, + }, {0, 3}}, + "Materials a and b have different attributes. Actual (+) vs expected (-):\n" + " Types: PbrMetallicRoughness\n" + " Base layer:\n" + " Layer 1:\n" + " + DoubleSided @ Bool: true\n" + " - Metalness @ Float: 5.5\n" + " NormalTexture @ UnsignedInt: 5\n" + " - NormalTextureLayer @ UnsignedInt: 2\n" + " + NormalTextureScale @ Float: 0.5\n" + " + OcclusionTexture @ UnsignedInt: 3\n", + "Materials b and a have different attributes. Actual (+) vs expected (-):\n" + " Types: PbrMetallicRoughness\n" + " Base layer:\n" + " Layer 1:\n" + " - DoubleSided @ Bool: true\n" + " + Metalness @ Float: 5.5\n" + " NormalTexture @ UnsignedInt: 5\n" + " + NormalTextureLayer @ UnsignedInt: 2\n" + " - NormalTextureScale @ Float: 0.5\n" + " - OcclusionTexture @ UnsignedInt: 3\n"}, {"different attribute types", Trade::MaterialData{{}, { {"pointer", reinterpret_cast(0xdead)},