From 5a1bcc6aa5b89d5ed7b9d94032bdd85627771208 Mon Sep 17 00:00:00 2001 From: Malcolm Tyrrell Date: Thu, 7 Oct 2021 09:29:56 +0100 Subject: [PATCH] Fix build and test --- test/unit/utglTF2ImportExport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index ed4c23547..288fa01a6 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -785,7 +785,7 @@ namespace { rapidjson::Document schemaDoc; schemaDoc.Parse(R"==({"properties":{"scene" : { "type" : "integer" }}, "required": [ "scene" ]})=="); EXPECT_FALSE(schemaDoc.HasParseError()); - m_schema = std::make_unique(schemaDoc, m_schemaName.c_str(), static_cast(m_schemaName.size()), this); + m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, m_schemaName.c_str(), static_cast(m_schemaName.size()), this)); } const rapidjson::SchemaDocument* GetRemoteDocument(const char* uri, rapidjson::SizeType) override { @@ -805,7 +805,7 @@ TEST_F(utglTF2ImportExport, schemaCheckPass) { FakeSchemaProvider schemaProvider("glTF.schema.json"); Assimp::Importer importer; importer.SetPropertyPointer(AI_CONFIG_IMPORT_SCHEMA_DOCUMENT_PROVIDER, &schemaProvider); - const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/gltf2/BoxTextured-glTF/BoxTextured.gltf", aiProcess_ValidateDataStructure); + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/BoxTextured-glTF/BoxTextured.gltf", aiProcess_ValidateDataStructure); EXPECT_NE(scene, nullptr); EXPECT_STREQ(importer.GetErrorString(), ""); } @@ -814,7 +814,7 @@ TEST_F(utglTF2ImportExport, schemaCheckFail) { FakeSchemaProvider schemaProvider("glTF.schema.json"); Assimp::Importer importer; importer.SetPropertyPointer(AI_CONFIG_IMPORT_SCHEMA_DOCUMENT_PROVIDER, &schemaProvider); - const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/gltf2/SchemaFailures/sceneWrongType.gltf", aiProcess_ValidateDataStructure); + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/SchemaFailures/sceneWrongType.gltf", aiProcess_ValidateDataStructure); EXPECT_EQ(scene, nullptr); const std::string errorString = importer.GetErrorString(); EXPECT_NE(errorString.find("The JSON document did not satisfy the glTF2 schema"), std::string::npos); @@ -826,7 +826,7 @@ TEST_F(utglTF2ImportExport, noSchemaFound) { FakeSchemaProvider schemaProvider("missingSchema.json"); Assimp::Importer importer; importer.SetPropertyPointer(AI_CONFIG_IMPORT_SCHEMA_DOCUMENT_PROVIDER, &schemaProvider); - const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/gltf2/BoxTextured-glTF/BoxTextured.gltf", aiProcess_ValidateDataStructure); + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/BoxTextured-glTF/BoxTextured.gltf", aiProcess_ValidateDataStructure); EXPECT_NE(scene, nullptr); EXPECT_STREQ(importer.GetErrorString(), ""); }