DecalTextureArrayTests.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/Component/ComponentApplication.h>
  10. #include <Atom/Feature/Utils/IndexableList.h>
  11. #include <AzCore/Memory/SystemAllocator.h>
  12. #include <gtest/gtest.h>
  13. #include <AzCore/Math/Random.h>
  14. #include <Decals/DecalTextureArray.h>
  15. #include <Atom/RPI.Public/Image/StreamingImagePool.h>
  16. #include <Atom/RPI.Reflect/Image/StreamingImagePoolAssetCreator.h>
  17. #include <AzCore/UnitTest/TestTypes.h>
  18. namespace UnitTest
  19. {
  20. using namespace AZ;
  21. using namespace AZ::Render;
  22. class DecalTextureArrayTests
  23. : public UnitTest::LeakDetectionFixture
  24. {
  25. };
  26. TEST_F(DecalTextureArrayTests, TestPackingNothing)
  27. {
  28. AZ::Render::DecalTextureArray decalTextureArray;
  29. decalTextureArray.Pack();
  30. auto nothing = decalTextureArray.GetPackedTexture(AZ::Render::DecalMapType_Diffuse);
  31. EXPECT_EQ(nothing, nullptr);
  32. }
  33. // [GFX TODO][ATOM-5915] Add more comprehensive tests here involving packing StreamingImages
  34. }