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 // Tests for the command parser. | 5 // Tests for the command parser. |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "gpu/command_buffer/service/cmd_parser.h" | 11 #include "gpu/command_buffer/service/cmd_parser.h" |
10 #include "gpu/command_buffer/service/mocks.h" | 12 #include "gpu/command_buffer/service/mocks.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
12 | 14 |
13 namespace gpu { | 15 namespace gpu { |
14 | 16 |
15 using testing::_; | 17 using testing::_; |
16 using testing::Invoke; | 18 using testing::Invoke; |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 scoped_ptr<CommandBufferEntry[]> buffer2(new CommandBufferEntry[2]); | 306 scoped_ptr<CommandBufferEntry[]> buffer2(new CommandBufferEntry[2]); |
305 parser->SetBuffer( | 307 parser->SetBuffer( |
306 buffer2.get(), sizeof(CommandBufferEntry) * 2, 0, | 308 buffer2.get(), sizeof(CommandBufferEntry) * 2, 0, |
307 sizeof(CommandBufferEntry) * 2); | 309 sizeof(CommandBufferEntry) * 2); |
308 // The put and get should have reset to 0. | 310 // The put and get should have reset to 0. |
309 EXPECT_EQ(0, parser->get()); | 311 EXPECT_EQ(0, parser->get()); |
310 EXPECT_EQ(0, parser->put()); | 312 EXPECT_EQ(0, parser->put()); |
311 } | 313 } |
312 | 314 |
313 } // namespace gpu | 315 } // namespace gpu |
OLD | NEW |