/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include #include #include #include #include #include namespace EMotionFX { // Developer code and APIs with exclusionary terms will be deprecated as we introduce replacements across this project's related // codebases and APIs. Please note, some instances have been retained in the current version to provide backward compatibility // for assets/materials created prior to the change. These will be deprecated in the future. // Those tests validate the conversion of blendspace1d and blendspace2d node. TEST_F(SystemComponentFixture, TestLeaderFollowerConversionBlendSpace1D) { const AZStd::string buffer = R"( )" R"( )" R"( )"; // Verify if the property got converted correctly. AnimGraph* graph = AZ::Utils::LoadObjectFromBuffer(buffer.c_str(), buffer.size(), GetSerializeContext()); ASSERT_TRUE(graph != nullptr); AnimGraphNode* node = graph->RecursiveFindNodeByName("BlendSpace1D0"); ASSERT_TRUE(node != nullptr); BlendSpace1DNode* blendSpaceNode = azrtti_cast(node); ASSERT_TRUE(blendSpaceNode != nullptr); EXPECT_STREQ(blendSpaceNode->GetSyncLeaderMotionId().c_str(), "rin_walk_kick_04"); delete graph; } TEST_F(SystemComponentFixture, TestLeaderFollowerConversionBlendSpace2D) { const AZStd::string buffer = R"( )" R"( )"; // Verify if the property got converted correctly. AnimGraph* graph = AZ::Utils::LoadObjectFromBuffer(buffer.c_str(), buffer.size(), GetSerializeContext()); ASSERT_TRUE(graph != nullptr); AnimGraphNode* node = graph->RecursiveFindNodeByName("BlendSpace2D0"); ASSERT_TRUE(node != nullptr); BlendSpace2DNode* blendSpaceNode = azrtti_cast(node); ASSERT_TRUE(blendSpaceNode != nullptr); EXPECT_STREQ(blendSpaceNode->GetSyncLeaderMotionId().c_str(), "rin_walk_kick_03"); delete graph; } } // end namespace EMotionFX