diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-12-04 05:07:46 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-12-04 05:07:46 +0000 |
| commit | daaa17aa2f54ced48980d4fff33fec749bb091ac (patch) | |
| tree | 2e848e0fbe91076a2957df38d1a939e7f9e598ef | |
| parent | DynamicAtlasManager: added more tests + few minor updates (diff) | |
| download | DiligentCore-daaa17aa2f54ced48980d4fff33fec749bb091ac.tar.gz DiligentCore-daaa17aa2f54ced48980d4fff33fec749bb091ac.zip | |
DynamicAtlasManager: few minor udpates to tests
| -rw-r--r-- | Tests/DiligentCoreTest/src/GraphicsAccessories/DynamicAtlasManagerTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/DiligentCoreTest/src/GraphicsAccessories/DynamicAtlasManagerTest.cpp b/Tests/DiligentCoreTest/src/GraphicsAccessories/DynamicAtlasManagerTest.cpp index 6f85463a..c13fc5bd 100644 --- a/Tests/DiligentCoreTest/src/GraphicsAccessories/DynamicAtlasManagerTest.cpp +++ b/Tests/DiligentCoreTest/src/GraphicsAccessories/DynamicAtlasManagerTest.cpp @@ -263,6 +263,10 @@ TEST(GraphicsAccessories_DynamicAtlasManager, Allocate) EXPECT_EQ(Mgr.GetFreeRegionCount(), 1U); EXPECT_EQ(R2, Region(0, 0, 16, 16)); + auto R3 = Mgr.Allocate(48, 64); + EXPECT_FALSE(R3.IsEmpty()); + + Mgr.Free(std::move(R3)); Mgr.Free(std::move(R1)); Mgr.Free(std::move(R2)); EXPECT_EQ(Mgr.GetFreeRegionCount(), 1U); @@ -300,6 +304,10 @@ TEST(GraphicsAccessories_DynamicAtlasManager, Allocate) EXPECT_EQ(Mgr.GetFreeRegionCount(), 1U); EXPECT_EQ(R2, Region(0, 0, 16, 16)); + auto R3 = Mgr.Allocate(64, 48); + EXPECT_FALSE(R3.IsEmpty()); + + Mgr.Free(std::move(R3)); Mgr.Free(std::move(R1)); Mgr.Free(std::move(R2)); EXPECT_EQ(Mgr.GetFreeRegionCount(), 1U); |
