Add unit test for DebugCommands
This commit is contained in:
@@ -177,3 +177,24 @@ public:
|
||||
return str.Length();
|
||||
}
|
||||
};
|
||||
|
||||
// Test debug commands via static class.
|
||||
API_CLASS(Static, Attributes="DebugCommand") class FLAXENGINE_API TestDebugCommand1
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(TestDebugCommand1);
|
||||
|
||||
// Static variable to test.
|
||||
API_FIELD() static bool Var;
|
||||
};
|
||||
|
||||
// Test debug commands inside a class.
|
||||
API_CLASS() class FLAXENGINE_API TestDebugCommand2 : public ScriptingObject
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE(TestDebugCommand2);
|
||||
|
||||
// Static variable to test.
|
||||
API_FIELD(Attributes="DebugCommand") static float Var;
|
||||
|
||||
// Static method to test.
|
||||
API_FUNCTION(Attributes="DebugCommand") static void Exec();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user