Integrating github/staging through commit b0dd7ed
This commit is contained in:
+2547
File diff suppressed because it is too large
Load Diff
@@ -108,13 +108,9 @@ namespace ScriptCanvasTests
|
||||
|
||||
auto m_serializeContext = s_application->GetSerializeContext();
|
||||
auto m_behaviorContext = s_application->GetBehaviorContext();
|
||||
ScriptCanvasTesting::GlobalBusTraits::Reflect(m_serializeContext);
|
||||
ScriptCanvasTesting::GlobalBusTraits::Reflect(m_behaviorContext);
|
||||
ScriptCanvasTesting::LocalBusTraits::Reflect(m_serializeContext);
|
||||
ScriptCanvasTesting::LocalBusTraits::Reflect(m_behaviorContext);
|
||||
ScriptCanvasTesting::NativeHandlingOnlyBusTraits::Reflect(m_serializeContext);
|
||||
ScriptCanvasTesting::NativeHandlingOnlyBusTraits::Reflect(m_behaviorContext);
|
||||
ScriptCanvasTesting::TestTupleMethods::Reflect(m_behaviorContext);
|
||||
|
||||
ScriptCanvasTesting::Reflect(m_serializeContext);
|
||||
ScriptCanvasTesting::Reflect(m_behaviorContext);
|
||||
|
||||
::Nodes::InputMethodSharedDataSlotExampleNode::Reflect(m_serializeContext);
|
||||
::Nodes::InputMethodSharedDataSlotExampleNode::Reflect(m_behaviorContext);
|
||||
|
||||
@@ -20,6 +20,21 @@
|
||||
|
||||
namespace ScriptCanvasTesting
|
||||
{
|
||||
void Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
ScriptCanvasTesting::GlobalBusTraits::Reflect(context);
|
||||
ScriptCanvasTesting::LocalBusTraits::Reflect(context);
|
||||
ScriptCanvasTesting::NativeHandlingOnlyBusTraits::Reflect(context);
|
||||
ScriptCanvasTesting::TestTupleMethods::Reflect(context);
|
||||
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->EnumProperty<(AZ::u32)TestEnum::Alpha>("ALPHA");
|
||||
behaviorContext->EnumProperty<(AZ::u32)TestEnum::Bravo>("BRAVO");
|
||||
behaviorContext->EnumProperty<(AZ::u32)TestEnum::Charlie>("CHARLIE");
|
||||
}
|
||||
}
|
||||
|
||||
class GlobalEBusHandler
|
||||
: public GlobalEBus::Handler
|
||||
, public AZ::BehaviorEBusHandler
|
||||
@@ -99,6 +114,7 @@ namespace ScriptCanvasTesting
|
||||
modVoidDesc.m_eventName = "OnEvent-ZeroParam";
|
||||
|
||||
behaviorContext->EBus<GlobalEBus>("GlobalEBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Handler<GlobalEBusHandler>()
|
||||
->Event("AppendSweet", &GlobalEBus::Events::AppendSweet)
|
||||
->Event("Increment", &GlobalEBus::Events::Increment)
|
||||
@@ -154,6 +170,7 @@ namespace ScriptCanvasTesting
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->EBus<LocalEBus>("LocalEBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Handler<LocalEBusHandler>()
|
||||
->Event("AppendSweet", &LocalEBus::Events::AppendSweet)
|
||||
->Event("Increment", &LocalEBus::Events::Increment)
|
||||
@@ -167,6 +184,7 @@ namespace ScriptCanvasTesting
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->EBus<NativeHandlingOnlyEBus>("NativeHandlingOnlyEBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Event("AppendSweet", &NativeHandlingOnlyEBus::Events::AppendSweet)
|
||||
->Event("Increment", &NativeHandlingOnlyEBus::Events::Increment)
|
||||
->Event("Not", &NativeHandlingOnlyEBus::Events::Not)
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace AZ
|
||||
|
||||
namespace ScriptCanvasTesting
|
||||
{
|
||||
void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
class GlobalBusTraits : public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
@@ -104,4 +106,11 @@ namespace ScriptCanvasTesting
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
enum class TestEnum : AZ::u32
|
||||
{
|
||||
Alpha = 7,
|
||||
Bravo = 15,
|
||||
Charlie = 31,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,10 +43,7 @@ namespace ScriptCanvasTesting
|
||||
NodeableTestingLibrary::Reflect(context);
|
||||
|
||||
ScriptCanvasTestingNodes::BehaviorContextObjectTest::Reflect(context);
|
||||
ScriptCanvasTesting::GlobalBusTraits::Reflect(context);
|
||||
ScriptCanvasTesting::LocalBusTraits::Reflect(context);
|
||||
ScriptCanvasTesting::NativeHandlingOnlyBusTraits::Reflect(context);
|
||||
ScriptCanvasTesting::TestTupleMethods::Reflect(context);
|
||||
ScriptCanvasTesting::Reflect(context);
|
||||
}
|
||||
|
||||
void ScriptCanvasTestingSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
|
||||
@@ -95,6 +95,11 @@ TEST_F(ScriptCanvasTestFixture, InterpretedHelloWorld)
|
||||
RunUnitTestGraph("LY_SC_UnitTest_HelloWorld");
|
||||
}
|
||||
|
||||
TEST_F(ScriptCanvasTestFixture, InterpretedReadEnumConstant)
|
||||
{
|
||||
RunUnitTestGraph("LY_SC_UnitTest_ReadEnumConstant");
|
||||
}
|
||||
|
||||
TEST_F(ScriptCanvasTestFixture, InterpretedEventHandlerNoDisconnect)
|
||||
{
|
||||
GlobalHandler handler;
|
||||
|
||||
Reference in New Issue
Block a user