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

Unified Diff: gpu/command_buffer/client/transfer_buffer_unittest.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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/client/transfer_buffer_unittest.cc
diff --git a/gpu/command_buffer/client/transfer_buffer_unittest.cc b/gpu/command_buffer/client/transfer_buffer_unittest.cc
index 1a2a4b07dd177c7155d61e84c463d77b3113dff5..7a98b804972f9caf8cce2722be5051d95979a1d9 100644
--- a/gpu/command_buffer/client/transfer_buffer_unittest.cc
+++ b/gpu/command_buffer/client/transfer_buffer_unittest.cc
@@ -6,12 +6,15 @@
#include "gpu/command_buffer/client/transfer_buffer.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/compiler_specific.h"
#include "gpu/command_buffer/client/client_test_helper.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
#include "gpu/command_buffer/common/command_buffer.h"
-#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
using ::testing::_;
using ::testing::AtMost;
@@ -25,8 +28,8 @@ namespace gpu {
class TransferBufferTest : public testing::Test {
protected:
- static const int32 kNumCommandEntries = 400;
- static const int32 kCommandBufferSizeBytes =
+ static const int32_t kNumCommandEntries = 400;
+ static const int32_t kCommandBufferSizeBytes =
kNumCommandEntries * sizeof(CommandBufferEntry);
static const unsigned int kStartingOffset = 64;
static const unsigned int kAlignment = 4;
@@ -56,7 +59,7 @@ class TransferBufferTest : public testing::Test {
scoped_ptr<MockClientCommandBufferMockFlush> command_buffer_;
scoped_ptr<CommandBufferHelper> helper_;
scoped_ptr<TransferBuffer> transfer_buffer_;
- int32 transfer_buffer_id_;
+ int32_t transfer_buffer_id_;
};
void TransferBufferTest::SetUp() {
@@ -88,8 +91,8 @@ void TransferBufferTest::TearDown() {
// GCC requires these declarations, but MSVC requires they not be present
#ifndef _MSC_VER
-const int32 TransferBufferTest::kNumCommandEntries;
-const int32 TransferBufferTest::kCommandBufferSizeBytes;
+const int32_t TransferBufferTest::kNumCommandEntries;
+const int32_t TransferBufferTest::kCommandBufferSizeBytes;
const unsigned int TransferBufferTest::kStartingOffset;
const unsigned int TransferBufferTest::kAlignment;
const size_t TransferBufferTest::kTransferBufferSize;
@@ -227,17 +230,18 @@ class MockClientCommandBufferCanFail : public MockClientCommandBufferMockFlush {
}
MOCK_METHOD2(CreateTransferBuffer,
- scoped_refptr<Buffer>(size_t size, int32* id));
+ scoped_refptr<Buffer>(size_t size, int32_t* id));
- scoped_refptr<gpu::Buffer> RealCreateTransferBuffer(size_t size, int32* id) {
+ scoped_refptr<gpu::Buffer> RealCreateTransferBuffer(size_t size,
+ int32_t* id) {
return MockCommandBufferBase::CreateTransferBuffer(size, id);
}
};
class TransferBufferExpandContractTest : public testing::Test {
protected:
- static const int32 kNumCommandEntries = 400;
- static const int32 kCommandBufferSizeBytes =
+ static const int32_t kNumCommandEntries = 400;
+ static const int32_t kCommandBufferSizeBytes =
kNumCommandEntries * sizeof(CommandBufferEntry);
static const unsigned int kStartingOffset = 64;
static const unsigned int kAlignment = 4;
@@ -259,7 +263,7 @@ class TransferBufferExpandContractTest : public testing::Test {
scoped_ptr<MockClientCommandBufferCanFail> command_buffer_;
scoped_ptr<CommandBufferHelper> helper_;
scoped_ptr<TransferBuffer> transfer_buffer_;
- int32 transfer_buffer_id_;
+ int32_t transfer_buffer_id_;
};
void TransferBufferExpandContractTest::SetUp() {
@@ -310,8 +314,8 @@ void TransferBufferExpandContractTest::TearDown() {
// GCC requires these declarations, but MSVC requires they not be present
#ifndef _MSC_VER
-const int32 TransferBufferExpandContractTest::kNumCommandEntries;
-const int32 TransferBufferExpandContractTest::kCommandBufferSizeBytes;
+const int32_t TransferBufferExpandContractTest::kNumCommandEntries;
+const int32_t TransferBufferExpandContractTest::kCommandBufferSizeBytes;
const unsigned int TransferBufferExpandContractTest::kStartingOffset;
const unsigned int TransferBufferExpandContractTest::kAlignment;
const size_t TransferBufferExpandContractTest::kStartTransferBufferSize;
« no previous file with comments | « gpu/command_buffer/client/transfer_buffer.cc ('k') | gpu/command_buffer/client/vertex_array_object_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698