// // Copyright 2015 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Unit tests for HandleAllocator. // #include <unordered_set> #include "gmock/gmock.h" #include "gtest/gtest.h" #include "libANGLE/HandleAllocator.h" namespace { TEST(HandleAllocatorTest, ReservationsWithGaps) { … } TEST(HandleAllocatorTest, Random) { … } TEST(HandleAllocatorTest, Reallocation) { … } // The following test covers reserving a handle with max uint value. See // http://anglebug.com/42260058 TEST(HandleAllocatorTest, ReserveMaxUintHandle) { … } // The following test covers reserving a handle with max uint value minus one then max uint value. TEST(HandleAllocatorTest, ReserveMaxUintHandle2) { … } // To test if the allocator keep the handle in a sorted order. TEST(HandleAllocatorTest, SortedOrderHandle) { … } // Tests the reset method. TEST(HandleAllocatorTest, Reset) { … } // Tests the reset method of custom allocator works as expected. TEST(HandleAllocatorTest, ResetAndReallocate) { … } // Covers a particular bug with reserving and allocating sub ranges. TEST(HandleAllocatorTest, ReserveAndAllocateIterated) { … } // This test reproduces invalid heap bug when reserve resources after release. TEST(HandleAllocatorTest, ReserveAfterReleaseBug) { … } // This test is to verify that we consolidate handle ranges when releasing a handle. TEST(HandleAllocatorTest, ConsolidateRangeDuringRelease) { … } } // anonymous namespace