UtilTest.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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 <Framework/Util.h>
  9. #include <TestFramework/AWSCoreFixture.h>
  10. using namespace AWSCoreTestingUtils;
  11. using FrameworkUtilTest = AWSCoreFixture;
  12. TEST_F(FrameworkUtilTest, ToAwsString_UseAzString_GetExpectedAwsString)
  13. {
  14. const char* EXPECTED_STRING = "122334556454ABfdhfdjfdf";
  15. AZStd::string testString(EXPECTED_STRING);
  16. const Aws::String converted = AWSCore::Util::ToAwsString(testString);
  17. EXPECT_TRUE(strcmp(testString.c_str(), converted.c_str()) == 0);
  18. }
  19. TEST_F(FrameworkUtilTest, toAzString_UseAwsString_GetExpectedAzString)
  20. {
  21. const char* EXPECTED_STRING = "122334556454ABfdhfdjfdf";
  22. Aws::String testString(EXPECTED_STRING);
  23. const AZStd::string converted = AWSCore::Util::ToAZString(testString);
  24. EXPECT_TRUE(strcmp(testString.c_str(), converted.c_str()) == 0);
  25. }