diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index 00f76aa47..ef3fc4137 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -753,12 +753,18 @@ TEST_F(utglTF2ImportExport, wrongTypes) { // Deliberately broken version of the BoxTextured.gltf asset. using tup_T = std::tuple; std::vector wrongTypes = { - { "/glTF2/wrongTypes/badArray.gltf", "array", "primitives", "meshes[0]" }, - { "/glTF2/wrongTypes/badString.gltf", "string", "name", "scenes[0]" }, - { "/glTF2/wrongTypes/badUint.gltf", "uint", "index", "materials[0]" }, - { "/glTF2/wrongTypes/badNumber.gltf", "number", "scale", "materials[0]" }, - { "/glTF2/wrongTypes/badObject.gltf", "object", "pbrMetallicRoughness", "materials[0]" }, - { "/glTF2/wrongTypes/badExtension.gltf", "object", "KHR_texture_transform", "materials[0]" } +#ifdef __cpp_lib_constexpr_tuple + #define TUPLE(x, y, z, w) {x, y, z, w} +#else + #define TUPLE(x, y, z, w) tup_T(x, y, z, w) +#endif + TUPLE("/glTF2/wrongTypes/badArray.gltf", "array", "primitives", "meshes[0]"), + TUPLE("/glTF2/wrongTypes/badString.gltf", "string", "name", "scenes[0]"), + TUPLE("/glTF2/wrongTypes/badUint.gltf", "uint", "index", "materials[0]"), + TUPLE("/glTF2/wrongTypes/badNumber.gltf", "number", "scale", "materials[0]"), + TUPLE("/glTF2/wrongTypes/badObject.gltf", "object", "pbrMetallicRoughness", "materials[0]"), + TUPLE("/glTF2/wrongTypes/badExtension.gltf", "object", "KHR_texture_transform", "materials[0]") +#undef TUPLE }; for (const auto& tuple : wrongTypes) {