| Index: gpu/command_buffer/common/id_allocator_test.cc
|
| diff --git a/gpu/command_buffer/common/id_allocator_test.cc b/gpu/command_buffer/common/id_allocator_test.cc
|
| index 624f959b28725cd0866ffc953f7c4ff6d55cfb85..5d32e40b1bdd6a01ac48884c62eaf45afc1a36cd 100644
|
| --- a/gpu/command_buffer/common/id_allocator_test.cc
|
| +++ b/gpu/command_buffer/common/id_allocator_test.cc
|
| @@ -50,7 +50,7 @@ TEST_F(IdAllocatorTest, TestAdvanced) {
|
| IdAllocator *allocator = id_allocator();
|
|
|
| // Allocate the highest possible ID, to make life awkward.
|
| - allocator->AllocateIDAtOrAbove(-1);
|
| + allocator->AllocateIDAtOrAbove(~static_cast<ResourceId>(0));
|
|
|
| // Allocate a significant number of resources.
|
| const unsigned int kNumResources = 100;
|
| @@ -98,9 +98,9 @@ TEST_F(IdAllocatorTest, AllocateIdAtOrAbove) {
|
| EXPECT_GT(id3, kOffset);
|
| }
|
|
|
| -// Checks that AllocateIdAtOrAbove wraps around at the maximum 32-bit value.
|
| +// Checks that AllocateIdAtOrAbove wraps around at the maximum value.
|
| TEST_F(IdAllocatorTest, AllocateIdAtOrAboveWrapsAround) {
|
| - const ResourceId kMaxPossibleOffset = -1;
|
| + const ResourceId kMaxPossibleOffset = ~static_cast<ResourceId>(0);
|
| IdAllocator* allocator = id_allocator();
|
| ResourceId id1 = allocator->AllocateIDAtOrAbove(kMaxPossibleOffset);
|
| EXPECT_EQ(kMaxPossibleOffset, id1);
|
|
|