OLD | NEW |
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 // Include gtest.h out of order because <X11/X.h> #define's Bool & None, which |
| 6 // gtest uses as struct names (inside a namespace). This means that |
| 7 // #include'ing gtest after anything that pulls in X.h fails to compile. |
| 8 // This is http://code.google.com/p/googletest/issues/detail?id=371 |
| 9 #include "testing/gtest/include/gtest/gtest.h" |
5 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
6 #include "gpu/command_buffer/common/gl_mock.h" | 11 #include "gpu/command_buffer/common/gl_mock.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 | 12 |
9 namespace gpu { | 13 namespace gpu { |
10 namespace gles2 { | 14 namespace gles2 { |
11 | 15 |
12 class BufferManagerTest : public testing::Test { | 16 class BufferManagerTest : public testing::Test { |
13 public: | 17 public: |
14 BufferManagerTest() { | 18 BufferManagerTest() { |
15 } | 19 } |
16 ~BufferManagerTest() { | 20 ~BufferManagerTest() { |
17 manager_.Destroy(false); | 21 manager_.Destroy(false); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 max_value = 0; | 220 max_value = 0; |
217 EXPECT_TRUE(info->GetMaxValueForRange(0, 10, GL_UNSIGNED_INT, &max_value)); | 221 EXPECT_TRUE(info->GetMaxValueForRange(0, 10, GL_UNSIGNED_INT, &max_value)); |
218 EXPECT_EQ(120u, max_value); | 222 EXPECT_EQ(120u, max_value); |
219 // Check out of range fails. | 223 // Check out of range fails. |
220 EXPECT_FALSE(info->GetMaxValueForRange(0, 11, GL_UNSIGNED_INT, &max_value)); | 224 EXPECT_FALSE(info->GetMaxValueForRange(0, 11, GL_UNSIGNED_INT, &max_value)); |
221 EXPECT_FALSE(info->GetMaxValueForRange(40, 1, GL_UNSIGNED_INT, &max_value)); | 225 EXPECT_FALSE(info->GetMaxValueForRange(40, 1, GL_UNSIGNED_INT, &max_value)); |
222 } | 226 } |
223 | 227 |
224 } // namespace gles2 | 228 } // namespace gles2 |
225 } // namespace gpu | 229 } // namespace gpu |
226 | |
227 | |
OLD | NEW |