LuaEditorSystemComponentTests.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzToolsFramework/Script/LuaEditorSystemComponent.h>
  9. #include <AzCore/Script/ScriptContext.h>
  10. #include <AzTest/AzTest.h>
  11. namespace UnitTest
  12. {
  13. class LuaEditorSystemComponentTests
  14. : public ::testing::Test
  15. {
  16. public:
  17. void SetUp() {}
  18. void TearDown() {}
  19. void TestValidateLuaComponentBoilerplate()
  20. {
  21. AZ::ScriptContext scriptContext = AZ::ScriptContext();
  22. AZStd::string luaComponentBoilerplate =
  23. AzToolsFramework::Script::LuaEditorSystemComponent::GenerateLuaComponentBoilerplate("TEST_SCRIPT");
  24. ASSERT_TRUE(scriptContext.Execute(luaComponentBoilerplate.c_str()));
  25. }
  26. };
  27. TEST_F(LuaEditorSystemComponentTests, LuaEditorSystemComponentValidateLuaComponentBoilerplate)
  28. {
  29. TestValidateLuaComponentBoilerplate();
  30. }
  31. } // namespace UnitTest