3
0

AudioEngineWwiseEditorTest.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 <AzTest/AzTest.h>
  9. #include <AzCore/Memory/SystemAllocator.h>
  10. #include <AudioSystemEditor_wwise.h>
  11. namespace UnitTest
  12. {
  13. class AudioEngineWwiseEditorTests
  14. : public ::testing::Test
  15. {
  16. };
  17. TEST_F(AudioEngineWwiseEditorTests, CreateControl_LocalizedBankPath_NameDoesNotContainPath)
  18. {
  19. using namespace AudioControls;
  20. CAudioSystemEditor_wwise editorWwise;
  21. SControlDef controlDefinition("LocalizedBank", eWCT_WWISE_SOUND_BANK, true, nullptr, "en-us");
  22. auto audioControl = editorWwise.CreateControl(controlDefinition);
  23. // Ensure audioControl's name does not contain "en-us".
  24. AZStd::string name = audioControl->GetName();
  25. EXPECT_EQ(name.find("en-us"), AZStd::string::npos);
  26. }
  27. } // namespace UnitTest
  28. AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);