Integrating latest 47acbe8
This commit is contained in:
@@ -278,7 +278,7 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_ExecutionBasic)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
|
||||
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
|
||||
|
||||
@@ -298,7 +298,7 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_ExecutionFailure)
|
||||
|
||||
const bool invalidConnection = false;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
|
||||
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
|
||||
|
||||
@@ -424,7 +424,7 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_DataBasic)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
|
||||
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
|
||||
|
||||
@@ -460,148 +460,152 @@ TEST_F(ScriptCanvasTestFixture, SlotConnecting_DataBasic)
|
||||
}
|
||||
|
||||
// Exhaustive Data Connection Test(attempts to connect every data type to every other data type, in both input and output)
|
||||
TEST_F(ScriptCanvasTestFixture, SlotConnecting_DataExhaustive)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
|
||||
ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
|
||||
//
|
||||
// TEST_F(ScriptCanvasTestFixture, SlotConnecting_DataExhaustive)
|
||||
// {
|
||||
// using namespace ScriptCanvas;
|
||||
//
|
||||
// ScriptCanvas::Graph* graph = CreateGraph();
|
||||
// ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
|
||||
// ConfigurableUnitTestNode* outputNode = CreateConfigurableNode();
|
||||
//
|
||||
// Endpoint dynamicAnyInEndpoint;
|
||||
// Endpoint dynamicAnyOutEndpoint;
|
||||
//
|
||||
// Endpoint dynamicContainerInEndpoint;
|
||||
// Endpoint dynamicContainerOutEndpoint;
|
||||
//
|
||||
// Endpoint dynamicValueInEndpoint;
|
||||
// Endpoint dynamicValueOutEndpoint;
|
||||
//
|
||||
// AZStd::unordered_map< Data::Type, ScriptCanvas::Endpoint > inputTypeMapping;
|
||||
//
|
||||
// {
|
||||
// DynamicDataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
// slotConfiguration.m_dynamicDataType = DynamicDataType::Any;
|
||||
//
|
||||
// Slot* dynamicAnyInSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// dynamicAnyInEndpoint = Endpoint(inputNode->GetEntityId(), dynamicAnyInSlot->GetId());
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// DynamicDataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
// slotConfiguration.m_dynamicDataType = DynamicDataType::Any;
|
||||
//
|
||||
// Slot* dynamicAnyOutSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// dynamicAnyOutEndpoint = Endpoint(outputNode->GetEntityId(), dynamicAnyOutSlot->GetId());
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// DynamicDataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
// slotConfiguration.m_dynamicDataType = DynamicDataType::Container;
|
||||
//
|
||||
// Slot* dynamicContainerInSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// dynamicContainerInEndpoint = Endpoint(inputNode->GetEntityId(), dynamicContainerInSlot->GetId());
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// DynamicDataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
// slotConfiguration.m_dynamicDataType = DynamicDataType::Container;
|
||||
//
|
||||
// Slot* dynamicContainerOutSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// dynamicContainerOutEndpoint = Endpoint(outputNode->GetEntityId(), dynamicContainerOutSlot->GetId());
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// DynamicDataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
// slotConfiguration.m_dynamicDataType = DynamicDataType::Value;
|
||||
//
|
||||
// Slot* dynamicValueInSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// dynamicValueInEndpoint = Endpoint(inputNode->GetEntityId(), dynamicValueInSlot->GetId());
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// DynamicDataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
// slotConfiguration.m_dynamicDataType = DynamicDataType::Value;
|
||||
//
|
||||
// Slot* dynamicValueOutSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// dynamicValueOutEndpoint = Endpoint(outputNode->GetEntityId(), dynamicValueOutSlot->GetId());
|
||||
// }
|
||||
//
|
||||
// for (auto type : GetTypes())
|
||||
// {
|
||||
// DataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetType(type);
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
//
|
||||
// Slot* newSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// Endpoint inputEndpoint = Endpoint(inputNode->GetEntityId(), newSlot->GetId());
|
||||
// inputTypeMapping[type] = inputEndpoint;
|
||||
//
|
||||
// const bool validConnection = true;
|
||||
// TestIsConnectionPossible(dynamicAnyOutEndpoint, inputEndpoint, validConnection);
|
||||
//
|
||||
// bool isContainerType = Data::IsContainerType(type);
|
||||
//
|
||||
// TestIsConnectionPossible(dynamicContainerOutEndpoint, inputEndpoint, isContainerType);
|
||||
// TestIsConnectionPossible(dynamicValueOutEndpoint, inputEndpoint, !isContainerType);
|
||||
// }
|
||||
//
|
||||
// for (auto type : GetTypes())
|
||||
// {
|
||||
// DataSlotConfiguration slotConfiguration;
|
||||
//
|
||||
// slotConfiguration.m_name = GenerateSlotName();
|
||||
// slotConfiguration.SetType(type);
|
||||
// slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
//
|
||||
// Slot* outputSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
//
|
||||
// ScriptCanvas::Endpoint outputEndpoint(outputNode->GetEntityId(), outputSlot->GetId());
|
||||
//
|
||||
// const bool validConnection = true;
|
||||
// TestIsConnectionPossible(outputEndpoint, dynamicAnyInEndpoint, validConnection);
|
||||
//
|
||||
// bool isContainerType = Data::IsContainerType(type);
|
||||
//
|
||||
// TestIsConnectionPossible(outputEndpoint, dynamicContainerInEndpoint, isContainerType);
|
||||
// TestIsConnectionPossible(outputEndpoint, dynamicValueInEndpoint, !isContainerType);
|
||||
//
|
||||
// for (auto slotPair : inputTypeMapping)
|
||||
// {
|
||||
// bool isSameType = slotPair.first == type;
|
||||
//
|
||||
// TestIsConnectionPossible(outputEndpoint, slotPair.second, isSameType);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Endpoint dynamicAnyInEndpoint;
|
||||
Endpoint dynamicAnyOutEndpoint;
|
||||
|
||||
Endpoint dynamicContainerInEndpoint;
|
||||
Endpoint dynamicContainerOutEndpoint;
|
||||
|
||||
Endpoint dynamicValueInEndpoint;
|
||||
Endpoint dynamicValueOutEndpoint;
|
||||
|
||||
AZStd::unordered_map< Data::Type, ScriptCanvas::Endpoint > inputTypeMapping;
|
||||
|
||||
{
|
||||
DynamicDataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
slotConfiguration.m_dynamicDataType = DynamicDataType::Any;
|
||||
|
||||
Slot* dynamicAnyInSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
dynamicAnyInEndpoint = Endpoint(inputNode->GetEntityId(), dynamicAnyInSlot->GetId());
|
||||
}
|
||||
|
||||
{
|
||||
DynamicDataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
slotConfiguration.m_dynamicDataType = DynamicDataType::Any;
|
||||
|
||||
Slot* dynamicAnyOutSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
dynamicAnyOutEndpoint = Endpoint(outputNode->GetEntityId(), dynamicAnyOutSlot->GetId());
|
||||
}
|
||||
|
||||
{
|
||||
DynamicDataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
slotConfiguration.m_dynamicDataType = DynamicDataType::Container;
|
||||
|
||||
Slot* dynamicContainerInSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
dynamicContainerInEndpoint = Endpoint(inputNode->GetEntityId(), dynamicContainerInSlot->GetId());
|
||||
}
|
||||
|
||||
{
|
||||
DynamicDataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
slotConfiguration.m_dynamicDataType = DynamicDataType::Container;
|
||||
|
||||
Slot* dynamicContainerOutSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
dynamicContainerOutEndpoint = Endpoint(outputNode->GetEntityId(), dynamicContainerOutSlot->GetId());
|
||||
}
|
||||
|
||||
{
|
||||
DynamicDataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
slotConfiguration.m_dynamicDataType = DynamicDataType::Value;
|
||||
|
||||
Slot* dynamicValueInSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
dynamicValueInEndpoint = Endpoint(inputNode->GetEntityId(), dynamicValueInSlot->GetId());
|
||||
}
|
||||
|
||||
{
|
||||
DynamicDataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
slotConfiguration.m_dynamicDataType = DynamicDataType::Value;
|
||||
|
||||
Slot* dynamicValueOutSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
dynamicValueOutEndpoint = Endpoint(outputNode->GetEntityId(), dynamicValueOutSlot->GetId());
|
||||
}
|
||||
|
||||
for (auto type : GetTypes())
|
||||
{
|
||||
DataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetType(type);
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Input);
|
||||
|
||||
Slot* newSlot = inputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
Endpoint inputEndpoint = Endpoint(inputNode->GetEntityId(), newSlot->GetId());
|
||||
inputTypeMapping[type] = inputEndpoint;
|
||||
|
||||
const bool validConnection = true;
|
||||
TestIsConnectionPossible(dynamicAnyOutEndpoint, inputEndpoint, validConnection);
|
||||
|
||||
bool isContainerType = Data::IsContainerType(type);
|
||||
|
||||
TestIsConnectionPossible(dynamicContainerOutEndpoint, inputEndpoint, isContainerType);
|
||||
TestIsConnectionPossible(dynamicValueOutEndpoint, inputEndpoint, !isContainerType);
|
||||
}
|
||||
|
||||
for (auto type : GetTypes())
|
||||
{
|
||||
DataSlotConfiguration slotConfiguration;
|
||||
|
||||
slotConfiguration.m_name = GenerateSlotName();
|
||||
slotConfiguration.SetType(type);
|
||||
slotConfiguration.SetConnectionType(ConnectionType::Output);
|
||||
|
||||
Slot* outputSlot = outputNode->AddTestingSlot(slotConfiguration);
|
||||
|
||||
ScriptCanvas::Endpoint outputEndpoint(outputNode->GetEntityId(), outputSlot->GetId());
|
||||
|
||||
const bool validConnection = true;
|
||||
TestIsConnectionPossible(outputEndpoint, dynamicAnyInEndpoint, validConnection);
|
||||
|
||||
bool isContainerType = Data::IsContainerType(type);
|
||||
|
||||
TestIsConnectionPossible(outputEndpoint, dynamicContainerInEndpoint, isContainerType);
|
||||
TestIsConnectionPossible(outputEndpoint, dynamicValueInEndpoint, !isContainerType);
|
||||
|
||||
for (auto slotPair : inputTypeMapping)
|
||||
{
|
||||
bool isSameType = slotPair.first == type;
|
||||
|
||||
TestIsConnectionPossible(outputEndpoint, slotPair.second, isSameType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
TEST_F(ScriptCanvasTestFixture, TypeMatching_NumericType)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
@@ -1924,7 +1928,7 @@ TEST_F(ScriptCanvasTestFixture, SlotGrouping_BasicFunctionalitySanityTest)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* inputNode = CreateConfigurableNode();
|
||||
|
||||
Slot* dynamicInputSlot = nullptr;
|
||||
@@ -1978,7 +1982,7 @@ TEST_F(ScriptCanvasTestFixture, SlotGrouping_SingleGroupDisplayTypeConnection)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* groupedNode = CreateConfigurableNode();
|
||||
|
||||
Slot* dynamicInputSlot = nullptr;
|
||||
@@ -2097,7 +2101,7 @@ TEST_F(ScriptCanvasTestFixture, SlotGrouping_SingleGroupDisplayTypeConnection)
|
||||
TEST_F(ScriptCanvasTestFixture, SlotGrouping_MultiGroupDisplayTypeConnection)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* groupedNode = CreateConfigurableNode();
|
||||
|
||||
Slot* dynamicInputSlot = nullptr;
|
||||
@@ -2268,7 +2272,7 @@ TEST_F(ScriptCanvasTestFixture, SlotGrouping_SingleGroupDisplayTypeRestriction)
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* groupedNode = CreateConfigurableNode();
|
||||
|
||||
Slot* restrictedInputSlot = nullptr;
|
||||
@@ -2332,7 +2336,7 @@ TEST_F(ScriptCanvasTestFixture, SlotGrouping_SingleGroupDisplayTypeRestrictionCo
|
||||
{
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
ConfigurableUnitTestNode* groupedNode = CreateConfigurableNode();
|
||||
|
||||
Slot* restrictedInputSlot = nullptr;
|
||||
@@ -2436,7 +2440,7 @@ TEST_F(ScriptCanvasTestFixture, SlotGrouping_MultiGroupDisplayTypeRestrictionCon
|
||||
AZ::Crc32 firstGroupName = AZ::Crc32("FirstGroupName");
|
||||
AZ::Crc32 secondGroupName = AZ::Crc32("SecondGroupName");
|
||||
|
||||
Graph* graph = CreateGraph();
|
||||
ScriptCanvas::Graph* graph = CreateGraph();
|
||||
|
||||
ConfigurableUnitTestNode* groupedUnrestrictedNode = CreateConfigurableNode();
|
||||
|
||||
@@ -2596,3 +2600,4 @@ TEST_F(ScriptCanvasTestFixture, DynamicSlot_DisplayTypeDatum)
|
||||
EXPECT_EQ(dataType == randomType, sourceDatum->IS_A(dataType));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user