test_main.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  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 <AzCore/UnitTest/TestTypes.h>
  9. #include <AzCore/std/string/fixed_string.h>
  10. #include <AzCore/std/containers/fixed_vector.h>
  11. #include <AzTest/AzTest.h>
  12. #include <AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h>
  13. #include <Runner.h>
  14. AZ_TOOLS_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV)
  15. namespace UnitTest
  16. {
  17. using SerializeContextToolsFixture = UnitTest::LeakDetectionFixture;
  18. TEST_F(SerializeContextToolsFixture, SerializeContextTools_HelpOption_Works)
  19. {
  20. AZStd::fixed_string<32> appName{ "SerializeContextTools" };
  21. AZStd::fixed_string<32> helpArg{ "--help" };
  22. AZStd::fixed_vector<char*, 2> commandArgs{ appName.data(), helpArg.data() };
  23. EXPECT_EQ(0, SerializeContextTools::LaunchSerializeContextTools(int(commandArgs.size()),
  24. commandArgs.data()));
  25. }
  26. }