SurfaceDataTestFixtures.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #pragma once
  9. #include <AzTest/GemTestEnvironment.h>
  10. namespace UnitTest
  11. {
  12. // SurfaceData needs to use the GemTestEnvironment to load the LmbrCentral Gem so that Shape components can be used
  13. // in the unit tests and benchmarks.
  14. class SurfaceDataTestEnvironment
  15. : public AZ::Test::GemTestEnvironment
  16. {
  17. public:
  18. void AddGemsAndComponents() override;
  19. };
  20. #ifdef HAVE_BENCHMARK
  21. //! The Benchmark environment is used for one time setup and tear down of shared resources
  22. class SurfaceDataBenchmarkEnvironment
  23. : public AZ::Test::BenchmarkEnvironmentBase
  24. , public SurfaceDataTestEnvironment
  25. {
  26. protected:
  27. void SetUpBenchmark() override
  28. {
  29. SetupEnvironment();
  30. }
  31. void TearDownBenchmark() override
  32. {
  33. TeardownEnvironment();
  34. }
  35. };
  36. #endif
  37. }