From 51c4f557d34f3561e96becfd88ee6e3f26cf08c7 Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Sat, 12 Oct 2024 10:26:59 -0700 Subject: [PATCH] Restore test logic --- source/MaterialXTest/MaterialXCore/Document.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/MaterialXTest/MaterialXCore/Document.cpp b/source/MaterialXTest/MaterialXCore/Document.cpp index 853bfaf1cf..94f8b98708 100644 --- a/source/MaterialXTest/MaterialXCore/Document.cpp +++ b/source/MaterialXTest/MaterialXCore/Document.cpp @@ -105,8 +105,12 @@ TEST_CASE("Document", "[document]") customImpl->setNodeDef(customNodeDef); REQUIRE(customLibrary->validate()); - // Set data library reference. - doc->setDataLibrary(customLibrary); + // Import the custom library. + mx::DocumentPtr customDatalibrary = mx::createDocument(); + customDatalibrary->importLibrary(customLibrary); + + // Set data library + doc->setDataLibrary(customDatalibrary); mx::NodeGraphPtr importedNodeGraph = doc->getNodeGraph("custom:NG_custom"); mx::NodeDefPtr importedNodeDef = doc->getNodeDef("custom:ND_simpleSrf"); mx::ImplementationPtr importedImpl = doc->getImplementation("custom:IM_custom");