WwiseUnitTests.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "WwiseDefines.h"
  17. // We use Catch2 Test Harness, available starting UE5.1
  18. #if UE_5_2_OR_LATER
  19. #include "Tests/TestHarnessAdapter.h"
  20. #elif UE_5_1_OR_LATER
  21. #include "Tests/TestHarness.h"
  22. #endif // UE_5_2_OR_LATER
  23. #if UE_5_1_OR_LATER
  24. #if WITH_LOW_LEVEL_TESTS || defined(WITH_AUTOMATION_TESTS) && WITH_AUTOMATION_TESTS
  25. #define WWISE_UNIT_TESTS 1
  26. #endif
  27. #endif // UE_5_1_OR_LATER
  28. #ifndef WWISE_UNIT_TESTS
  29. #define WWISE_UNIT_TESTS 0
  30. #endif
  31. #if WWISE_UNIT_TESTS
  32. #include <type_traits>
  33. // Add logging facilities when running in Automation
  34. #if defined(WITH_AUTOMATION_TESTS) && WITH_AUTOMATION_TESTS
  35. #define WWISETEST_LOG(Format, ...) FAutomationTestFramework::Get().GetCurrentTest()->AddInfo(FString::Printf(TEXT(Format), __VA_ARGS__));
  36. #else
  37. #define WWISETEST_LOG(Format, ...) (void)0
  38. #endif
  39. #endif // WWISE_UNIT_TESTS