Code/Tools

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-20 17:54:20 -07:00
parent ca03f65a5d
commit a2ab05a262
31 changed files with 28 additions and 75 deletions
@@ -332,7 +332,7 @@ namespace AZ
{
SceneGraph testSceneGraph;
AZStd::shared_ptr<DataTypes::MockIGraphObject> testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "FirstChild", AZStd::move(testDataObject));
testSceneGraph.AddChild(testSceneGraph.GetRoot(), "FirstChild", AZStd::move(testDataObject));
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "SecondChild", AZStd::move(testDataObject));
@@ -350,7 +350,7 @@ namespace AZ
SceneGraph::NodeIndex testRootNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "testRoot", AZStd::move(testDataObject));
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject));
@@ -371,10 +371,10 @@ namespace AZ
SceneGraph::NodeIndex testRootNodeSiblingIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "testRootSibling", AZStd::move(testDataObject));
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject));
testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject));
SceneGraph::NodeIndex foundIndex = testSceneGraph.Find(testRootNodeSiblingIndex, "SecondChild");
EXPECT_FALSE(foundIndex.IsValid());
@@ -475,7 +475,7 @@ namespace AZ
AZStd::string expectedNodeName("TestNode");
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), expectedNodeName.c_str());
testSceneGraph.AddChild(testSceneGraph.GetRoot(), expectedNodeName.c_str());
SceneGraph::NodeIndex foundIndex = testSceneGraph.Find(expectedNodeName);
ASSERT_TRUE(foundIndex.IsValid());
const SceneGraph::Name& nodeName = testSceneGraph.GetNodeName(foundIndex);
@@ -303,7 +303,6 @@ namespace AZ
TYPED_TEST_P(SceneGraphDownwardsIteratorContext, Algorithms_FindIf_FindsValue3InNodeAdotC)
{
using Traversal = typename SceneGraphDownwardsIteratorContext<TypeParam>::Traversal;
SceneGraph::NodeIndex index = this->m_graph.Find("A.C");
auto sceneView = MakeSceneGraphDownwardsView<Traversal>(this->m_graph, this->m_graph.GetContentStorage().begin());
auto result = AZStd::find_if(sceneView.begin(), sceneView.end(),
[](const AZStd::shared_ptr<DataTypes::IGraphObject>& object) -> bool