Integrating github/staging through commit ab87ed9

This commit is contained in:
alexpete
2021-04-09 11:27:37 -07:00
parent ae62a97894
commit 1044dc3da1
1582 changed files with 29374 additions and 519051 deletions
@@ -618,14 +618,16 @@ namespace ScriptCanvasTests
return name;
}
void DumpSlots(const ScriptCanvas::Node& node)
void DumpSlots([[maybe_unused]] const ScriptCanvas::Node& node)
{
#if defined(AZ_ENABLE_TRACING)
const auto& nodeslots = node.GetSlots();
for (const auto& nodeslot : nodeslots)
{
AZ_TracePrintf("ScriptCanvasTest", "'%s':%s\n", nodeslot.GetName().data(), SlotDescriptorToString(nodeslot.GetDescriptor()).c_str());
}
#endif
}
bool Connect(ScriptCanvas::Graph& graph, const AZ::EntityId& fromNodeID, const char* fromSlotName, const AZ::EntityId& toNodeID, const char* toSlotName, bool dumpSlotsOnFailure /*= true*/)
@@ -341,9 +341,8 @@ namespace ScriptCanvasTests
~TestBehaviorContextObject()
{
AZ::u32 destroyedCount = ++s_destroyedCount;
AZ::u32 createdCount = s_createdCount;
AZ_Assert(destroyedCount <= createdCount, "ScriptCanvas execution error");
[[maybe_unused]] AZ::u32 destroyedCount = ++s_destroyedCount;
AZ_Assert(destroyedCount <= s_createdCount, "ScriptCanvas execution error");
}
TestBehaviorContextObject& operator=(const TestBehaviorContextObject& source)
@@ -164,17 +164,16 @@ TEST_F(ScriptCanvasTestFixture, Asynchronous_Behaviors)
AZ::Entity* graphEntity = graph->GetEntity();
graphEntity->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::Entity* startEntity{ aznew AZ::Entity };
startEntity->Init();
AZ::EntityId startNodeId;
ScriptCanvas::Nodes::Core::Start* startNode = CreateTestNode<ScriptCanvas::Nodes::Core::Start>(graphUniqueId, startNodeId);
CreateTestNode<ScriptCanvas::Nodes::Core::Start>(graphUniqueId, startNodeId);
AZ::EntityId asyncNodeId;
AsyncNode* asyncNode = CreateTestNode<AsyncNode>(graphUniqueId, asyncNodeId);
CreateTestNode<AsyncNode>(graphUniqueId, asyncNodeId);
EXPECT_TRUE(Connect(*graph, startNodeId, ScriptCanvas::CommonSlots::GeneralOutSlot::GetName(), asyncNodeId, ScriptCanvas::CommonSlots::GeneralInSlot::GetName()));
@@ -295,14 +294,13 @@ TEST_F(ScriptCanvasTestFixture, ComputeFibonacciAsyncGraphTest)
AZ::Entity* graphEntity = graph->GetEntity();
graphEntity->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startNodeId;
ScriptCanvas::Nodes::Core::Start* startNode = CreateTestNode<ScriptCanvas::Nodes::Core::Start>(graphUniqueId, startNodeId);
CreateTestNode<ScriptCanvas::Nodes::Core::Start>(graphUniqueId, startNodeId);
AZ::EntityId asyncNodeId;
AsyncFibonacciComputeNode* asyncNode = CreateTestNode<AsyncFibonacciComputeNode>(graphUniqueId, asyncNodeId);
CreateTestNode<AsyncFibonacciComputeNode>(graphUniqueId, asyncNodeId);
EXPECT_TRUE(Connect(*graph, startNodeId, "Out", asyncNodeId, "In"));
@@ -39,7 +39,6 @@ TEST_F(ScriptCanvasTestFixture, BehaviorContextObjectGenericConstructor)
auto graph = graphEntity->FindComponent<ScriptCanvas::Graph>();
EXPECT_NE(nullptr, graph);
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
//Validates the GenericConstructorOverride attribute is being used to construct types that are normally not initialized in C++
@@ -81,7 +80,6 @@ TEST_F(ScriptCanvasTestFixture, BehaviorContext_BusHandlerNodeFootPrint)
ScriptCanvas::Graph* graph = AZ::EntityUtils::FindFirstDerivedComponent<ScriptCanvas::Graph>(graphEntity);
graphEntity->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId uuidEventHandlerId;
@@ -364,16 +364,16 @@ TEST_F(ScriptCanvasTestFixture, ValueTypes)
double numberDoubleValue = *numberDouble.GetAs<double>();
Datum numberHex(Datum(0xff));
int numberHexValue = *numberHex.GetAs<int>();
/*int numberHexValue =*/ *numberHex.GetAs<int>();
Datum numberPi(Datum(3.14f));
float numberPiValue = *numberPi.GetAs<float>();
Datum numberSigned(Datum(-100));
int numberSignedValue = *numberSigned.GetAs<int>();
/*int numberSignedValue =*/ *numberSigned.GetAs<int>();
Datum numberUnsigned(Datum(100u));
unsigned int numberUnsignedValue = *numberUnsigned.GetAs<unsigned int>();
/*unsigned int numberUnsignedValue =*/ *numberUnsigned.GetAs<unsigned int>();
Datum numberDoublePi(Datum(6.28));
double numberDoublePiValue = *numberDoublePi.GetAs<double>();
@@ -456,7 +456,6 @@ TEST_F(ScriptCanvasTestFixture, Contracts)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
// Make the nodes.
@@ -704,7 +703,6 @@ TEST_F(ScriptCanvasTestFixture, EntityRefTest)
graph->GetEntity()->CreateComponent<ScriptCanvasTests::TestComponent>();
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -805,7 +803,6 @@ TEST_F(ScriptCanvasTestFixture, ExecutionLength)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityID = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -140,7 +140,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenerics)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -154,7 +153,7 @@ TEST_F(ScriptCanvasTestFixture, NodeGenerics)
CreateTestNode<NoArgsReturnNode>(graphUniqueId, noArgsReturnNodeID);
AZ::EntityId normalizeWithDefaultNodeID;
auto normalizeWithDefaultNode = CreateTestNode<NormalizeWithDefaultNode>(graphUniqueId, normalizeWithDefaultNodeID);
CreateTestNode<NormalizeWithDefaultNode>(graphUniqueId, normalizeWithDefaultNodeID);
AZ::EntityId unused0, unused1;
CreateTestNode<ArgsReturnMultiNode>(graphUniqueId, unused0);
@@ -189,7 +188,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByValue)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -279,7 +277,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointer)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -372,7 +369,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByReference)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -542,7 +538,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointerInteger)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -624,7 +619,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByReferenceInteger)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -706,7 +700,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByValueMulti)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -837,7 +830,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByReferenceMulti)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -968,7 +960,6 @@ TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointerMulti)
EXPECT_TRUE(graph != nullptr);
graph->GetEntity()->Init();
const AZ::EntityId& graphEntityId = graph->GetEntityId();
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
AZ::EntityId startID;
@@ -278,7 +278,7 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_ExecutionBasic)
{
using namespace ScriptCanvas;
ScriptCanvas::Graph* graph = CreateGraph();
CreateGraph();
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
@@ -298,7 +298,7 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_ExecutionFailure)
const bool invalidConnection = false;
ScriptCanvas::Graph* graph = CreateGraph();
CreateGraph();
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
@@ -424,7 +424,7 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_DataBasic)
{
using namespace ScriptCanvas;
ScriptCanvas::Graph* graph = CreateGraph();
CreateGraph();
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();