Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: gpu/command_buffer/common/id_allocator_test.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/common/id_allocator.cc ('k') | gpu/command_buffer/common/mailbox.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has the unit tests for the IdAllocator class. 5 // This file has the unit tests for the IdAllocator class.
6 6
7 #include <stdint.h>
8
7 #include "gpu/command_buffer/common/id_allocator.h" 9 #include "gpu/command_buffer/common/id_allocator.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 namespace gpu { 12 namespace gpu {
11 13
12 class IdAllocatorTest : public testing::Test { 14 class IdAllocatorTest : public testing::Test {
13 protected: 15 protected:
14 void SetUp() override {} 16 void SetUp() override {}
15 void TearDown() override {} 17 void TearDown() override {}
16 18
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 ResourceId id1 = allocator->AllocateIDAtOrAbove(0); 240 ResourceId id1 = allocator->AllocateIDAtOrAbove(0);
239 EXPECT_NE(0u, id1); 241 EXPECT_NE(0u, id1);
240 EXPECT_FALSE(allocator->InUse(0)); 242 EXPECT_FALSE(allocator->InUse(0));
241 allocator->FreeID(0); 243 allocator->FreeID(0);
242 EXPECT_FALSE(allocator->InUse(0)); 244 EXPECT_FALSE(allocator->InUse(0));
243 EXPECT_TRUE(allocator->InUse(id1)); 245 EXPECT_TRUE(allocator->InUse(id1));
244 allocator->FreeID(id1); 246 allocator->FreeID(id1);
245 EXPECT_FALSE(allocator->InUse(id1)); 247 EXPECT_FALSE(allocator->InUse(id1));
246 } 248 }
247 } // namespace gpu 249 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/id_allocator.cc ('k') | gpu/command_buffer/common/mailbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698