The Great ScriptCanvas Purge, Part IV
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -470,213 +470,11 @@ TEST_F(ScriptCanvasTestFixture, Contracts)
|
||||
graph->GetEntity()->Deactivate();
|
||||
delete graph->GetEntity();
|
||||
}
|
||||
//
|
||||
// TEST_F(ScriptCanvasTestFixture, BinaryOperationTest)
|
||||
// {
|
||||
//
|
||||
// using namespace ScriptCanvas::Nodes;
|
||||
// using namespace ScriptCanvas::Nodes::Comparison;
|
||||
//
|
||||
// TestBehaviorContextObject::Reflect(m_serializeContext);
|
||||
// TestBehaviorContextObject::Reflect(m_behaviorContext);
|
||||
//
|
||||
// BinaryOpTest<EqualTo>(1, 1, true);
|
||||
// BinaryOpTest<EqualTo>(1, 0, false);
|
||||
// BinaryOpTest<EqualTo>(0, 1, false);
|
||||
// BinaryOpTest<EqualTo>(0, 0, true);
|
||||
//
|
||||
// BinaryOpTest<NotEqualTo>(1, 1, false);
|
||||
// BinaryOpTest<NotEqualTo>(1, 0, true);
|
||||
// BinaryOpTest<NotEqualTo>(0, 1, true);
|
||||
// BinaryOpTest<NotEqualTo>(0, 0, false);
|
||||
//
|
||||
// BinaryOpTest<Greater>(1, 1, false);
|
||||
// BinaryOpTest<Greater>(1, 0, true);
|
||||
// BinaryOpTest<Greater>(0, 1, false);
|
||||
// BinaryOpTest<Greater>(0, 0, false);
|
||||
//
|
||||
// BinaryOpTest<GreaterEqual>(1, 1, true);
|
||||
// BinaryOpTest<GreaterEqual>(1, 0, true);
|
||||
// BinaryOpTest<GreaterEqual>(0, 1, false);
|
||||
// BinaryOpTest<GreaterEqual>(0, 0, true);
|
||||
//
|
||||
// BinaryOpTest<Less>(1, 1, false);
|
||||
// BinaryOpTest<Less>(1, 0, false);
|
||||
// BinaryOpTest<Less>(0, 1, true);
|
||||
// BinaryOpTest<Less>(0, 0, false);
|
||||
//
|
||||
// BinaryOpTest<LessEqual>(1, 1, true);
|
||||
// BinaryOpTest<LessEqual>(1, 0, false);
|
||||
// BinaryOpTest<LessEqual>(0, 1, true);
|
||||
// BinaryOpTest<LessEqual>(0, 0, true);
|
||||
//
|
||||
// BinaryOpTest<EqualTo>(true, true, true);
|
||||
// BinaryOpTest<EqualTo>(true, false, false);
|
||||
// BinaryOpTest<EqualTo>(false, true, false);
|
||||
// BinaryOpTest<EqualTo>(false, false, true);
|
||||
//
|
||||
// BinaryOpTest<NotEqualTo>(true, true, false);
|
||||
// BinaryOpTest<NotEqualTo>(true, false, true);
|
||||
// BinaryOpTest<NotEqualTo>(false, true, true);
|
||||
// BinaryOpTest<NotEqualTo>(false, false, false);
|
||||
//
|
||||
// AZStd::string string0("a string");
|
||||
// AZStd::string string1("b string");
|
||||
//
|
||||
// BinaryOpTest<EqualTo>(string1, string1, true);
|
||||
// BinaryOpTest<EqualTo>(string1, string0, false);
|
||||
// BinaryOpTest<EqualTo>(string0, string1, false);
|
||||
// BinaryOpTest<EqualTo>(string0, string0, true);
|
||||
//
|
||||
// BinaryOpTest<NotEqualTo>(string1, string1, false);
|
||||
// BinaryOpTest<NotEqualTo>(string1, string0, true);
|
||||
// BinaryOpTest<NotEqualTo>(string0, string1, true);
|
||||
// BinaryOpTest<NotEqualTo>(string0, string0, false);
|
||||
//
|
||||
// BinaryOpTest<Greater>(string1, string1, false);
|
||||
// BinaryOpTest<Greater>(string1, string0, true);
|
||||
// BinaryOpTest<Greater>(string0, string1, false);
|
||||
// BinaryOpTest<Greater>(string0, string0, false);
|
||||
//
|
||||
// BinaryOpTest<GreaterEqual>(string1, string1, true);
|
||||
// BinaryOpTest<GreaterEqual>(string1, string0, true);
|
||||
// BinaryOpTest<GreaterEqual>(string0, string1, false);
|
||||
// BinaryOpTest<GreaterEqual>(string0, string0, true);
|
||||
//
|
||||
// BinaryOpTest<Less>(string1, string1, false);
|
||||
// BinaryOpTest<Less>(string1, string0, false);
|
||||
// BinaryOpTest<Less>(string0, string1, true);
|
||||
// BinaryOpTest<Less>(string0, string0, false);
|
||||
//
|
||||
// BinaryOpTest<LessEqual>(string1, string1, true);
|
||||
// BinaryOpTest<LessEqual>(string1, string0, false);
|
||||
// BinaryOpTest<LessEqual>(string0, string1, true);
|
||||
// BinaryOpTest<LessEqual>(string0, string0, true);
|
||||
//
|
||||
// const AZ::Vector3 vectorOne(1.0f, 1.0f, 1.0f);
|
||||
// const AZ::Vector3 vectorZero(0.0f, 0.0f, 0.0f);
|
||||
//
|
||||
// BinaryOpTest<EqualTo>(vectorOne, vectorOne, true);
|
||||
// BinaryOpTest<EqualTo>(vectorOne, vectorZero, false);
|
||||
// BinaryOpTest<EqualTo>(vectorZero, vectorOne, false);
|
||||
// BinaryOpTest<EqualTo>(vectorZero, vectorZero, true);
|
||||
//
|
||||
// BinaryOpTest<NotEqualTo>(vectorOne, vectorOne, false);
|
||||
// BinaryOpTest<NotEqualTo>(vectorOne, vectorZero, true);
|
||||
// BinaryOpTest<NotEqualTo>(vectorZero, vectorOne, true);
|
||||
// BinaryOpTest<NotEqualTo>(vectorZero, vectorZero, false);
|
||||
//
|
||||
// const TestBehaviorContextObject zero(0);
|
||||
// const TestBehaviorContextObject one(1);
|
||||
// const TestBehaviorContextObject otherOne(1);
|
||||
//
|
||||
// BinaryOpTest<EqualTo>(one, one, true);
|
||||
// BinaryOpTest<EqualTo>(one, zero, false);
|
||||
// BinaryOpTest<EqualTo>(zero, one, false);
|
||||
// BinaryOpTest<EqualTo>(zero, zero, true);
|
||||
//
|
||||
// BinaryOpTest<NotEqualTo>(one, one, false);
|
||||
// BinaryOpTest<NotEqualTo>(one, zero, true);
|
||||
// BinaryOpTest<NotEqualTo>(zero, one, true);
|
||||
// BinaryOpTest<NotEqualTo>(zero, zero, false);
|
||||
//
|
||||
// BinaryOpTest<Greater>(one, one, false);
|
||||
// BinaryOpTest<Greater>(one, zero, true);
|
||||
// BinaryOpTest<Greater>(zero, one, false);
|
||||
// BinaryOpTest<Greater>(zero, zero, false);
|
||||
//
|
||||
// BinaryOpTest<GreaterEqual>(one, one, true);
|
||||
// BinaryOpTest<GreaterEqual>(one, zero, true);
|
||||
// BinaryOpTest<GreaterEqual>(zero, one, false);
|
||||
// BinaryOpTest<GreaterEqual>(zero, zero, true);
|
||||
//
|
||||
// BinaryOpTest<Less>(one, one, false);
|
||||
// BinaryOpTest<Less>(one, zero, false);
|
||||
// BinaryOpTest<Less>(zero, one, true);
|
||||
// BinaryOpTest<Less>(zero, zero, false);
|
||||
//
|
||||
// BinaryOpTest<LessEqual>(one, one, true);
|
||||
// BinaryOpTest<LessEqual>(one, zero, false);
|
||||
// BinaryOpTest<LessEqual>(zero, one, true);
|
||||
// BinaryOpTest<LessEqual>(zero, zero, true);
|
||||
//
|
||||
// BinaryOpTest<EqualTo>(one, otherOne, true);
|
||||
// BinaryOpTest<EqualTo>(otherOne, one, true);
|
||||
//
|
||||
// BinaryOpTest<NotEqualTo>(one, otherOne, false);
|
||||
// BinaryOpTest<NotEqualTo>(otherOne, one, false);
|
||||
//
|
||||
// BinaryOpTest<Greater>(one, otherOne, false);
|
||||
// BinaryOpTest<Greater>(otherOne, one, false);
|
||||
//
|
||||
// BinaryOpTest<GreaterEqual>(one, otherOne, true);
|
||||
// BinaryOpTest<GreaterEqual>(otherOne, one, true);
|
||||
//
|
||||
// BinaryOpTest<Less>(one, otherOne, false);
|
||||
// BinaryOpTest<Less>(otherOne, one, false);
|
||||
//
|
||||
// BinaryOpTest<LessEqual>(one, otherOne, true);
|
||||
// BinaryOpTest<LessEqual>(otherOne, one, true);
|
||||
//
|
||||
// // force failures, to verify crash proofiness
|
||||
// BinaryOpTest<EqualTo>(one, zero, false, true);
|
||||
// BinaryOpTest<NotEqualTo>(one, zero, true, true);
|
||||
// BinaryOpTest<Greater>(one, zero, true, true);
|
||||
// BinaryOpTest<GreaterEqual>(one, zero, true, true);
|
||||
// BinaryOpTest<Less>(one, zero, false, true);
|
||||
// BinaryOpTest<LessEqual>(one, zero, false, true);
|
||||
//
|
||||
// m_serializeContext->EnableRemoveReflection();
|
||||
// m_behaviorContext->EnableRemoveReflection();
|
||||
// TestBehaviorContextObject::Reflect(m_serializeContext);
|
||||
// TestBehaviorContextObject::Reflect(m_behaviorContext);
|
||||
// m_serializeContext->DisableRemoveReflection();
|
||||
// m_behaviorContext->DisableRemoveReflection();
|
||||
// }
|
||||
|
||||
const int k_executionCount = 998;
|
||||
|
||||
TEST_F(ScriptCanvasTestFixture, ExecutionLength)
|
||||
{
|
||||
|
||||
using namespace ScriptCanvas;
|
||||
|
||||
ScriptCanvas::Graph* graph(nullptr);
|
||||
SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph);
|
||||
EXPECT_TRUE(graph != nullptr);
|
||||
graph->GetEntity()->Init();
|
||||
|
||||
const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId();
|
||||
|
||||
AZ::EntityId startID;
|
||||
CreateTestNode<ScriptCanvas::Nodes::Core::Start>(graphUniqueId, startID);
|
||||
|
||||
AZ::EntityId previousID = startID;
|
||||
|
||||
for (int i = 0; i < k_executionCount; ++i)
|
||||
{
|
||||
AZ::EntityId printNodeID;
|
||||
TestResult* printNode = CreateTestNode<TestResult>(graphUniqueId, printNodeID);
|
||||
printNode->SetInput_UNIT_TEST<int>("Value", i);
|
||||
EXPECT_TRUE(Connect(*graph, previousID, "Out", printNodeID, "In"));
|
||||
previousID = printNodeID;
|
||||
}
|
||||
|
||||
AZ::Entity* graphEntity = graph->GetEntity();
|
||||
{
|
||||
ScriptCanvasEditor::ScopedOutputSuppression suppressOutput;
|
||||
graphEntity->Activate();
|
||||
}
|
||||
|
||||
ReportErrors(graph);
|
||||
|
||||
graphEntity->Deactivate();
|
||||
delete graphEntity;
|
||||
}
|
||||
|
||||
TEST_F(ScriptCanvasTestFixture, While)
|
||||
{
|
||||
|
||||
RunUnitTestGraph("LY_SC_UnitTest_While", ScriptCanvas::ExecutionMode::Interpreted);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user