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

Side by Side Diff: cc/quads/list_container_unittest.cc

Issue 628443002: replace OVERRIDE and FINAL with override and final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 months 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 | « cc/quads/io_surface_draw_quad.h ('k') | cc/quads/picture_draw_quad.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/quads/list_container.h" 5 #include "cc/quads/list_container.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "cc/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/quads/largest_draw_quad.h" 9 #include "cc/quads/largest_draw_quad.h"
10 #include "cc/quads/render_pass_draw_quad.h" 10 #include "cc/quads/render_pass_draw_quad.h"
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 bool isConstSharedQuadStatePointer(SharedQuadState* ptr) { 26 bool isConstSharedQuadStatePointer(SharedQuadState* ptr) {
27 return false; 27 return false;
28 } 28 }
29 29
30 class SimpleDrawQuad : public DrawQuad { 30 class SimpleDrawQuad : public DrawQuad {
31 public: 31 public:
32 virtual ~SimpleDrawQuad() {} 32 virtual ~SimpleDrawQuad() {}
33 virtual void IterateResources( 33 virtual void IterateResources(
34 const ResourceIteratorCallback& callback) OVERRIDE {} 34 const ResourceIteratorCallback& callback) override {}
35 35
36 void set_value(int val) { value = val; } 36 void set_value(int val) { value = val; }
37 int get_value() { return value; } 37 int get_value() { return value; }
38 virtual void ExtendValue(base::debug::TracedValue* value) const OVERRIDE {} 38 virtual void ExtendValue(base::debug::TracedValue* value) const override {}
39 39
40 private: 40 private:
41 int value; 41 int value;
42 }; 42 };
43 43
44 class SimpleDrawQuadConstructMagicNumberOne : public SimpleDrawQuad { 44 class SimpleDrawQuadConstructMagicNumberOne : public SimpleDrawQuad {
45 public: 45 public:
46 SimpleDrawQuadConstructMagicNumberOne() : SimpleDrawQuad() { 46 SimpleDrawQuadConstructMagicNumberOne() : SimpleDrawQuad() {
47 set_value(kMagicNumberToUseForDrawQuadOne); 47 set_value(kMagicNumberToUseForDrawQuadOne);
48 } 48 }
49 }; 49 };
50 50
51 class SimpleDrawQuadConstructMagicNumberTwo : public SimpleDrawQuad { 51 class SimpleDrawQuadConstructMagicNumberTwo : public SimpleDrawQuad {
52 public: 52 public:
53 SimpleDrawQuadConstructMagicNumberTwo() : SimpleDrawQuad() { 53 SimpleDrawQuadConstructMagicNumberTwo() : SimpleDrawQuad() {
54 set_value(kMagicNumberToUseForDrawQuadTwo); 54 set_value(kMagicNumberToUseForDrawQuadTwo);
55 } 55 }
56 }; 56 };
57 57
58 class MockDrawQuad : public DrawQuad { 58 class MockDrawQuad : public DrawQuad {
59 public: 59 public:
60 virtual ~MockDrawQuad() { Destruct(); } 60 virtual ~MockDrawQuad() { Destruct(); }
61 virtual void IterateResources( 61 virtual void IterateResources(
62 const ResourceIteratorCallback& callback) OVERRIDE {} 62 const ResourceIteratorCallback& callback) override {}
63 virtual void ExtendValue(base::debug::TracedValue* value) const OVERRIDE {} 63 virtual void ExtendValue(base::debug::TracedValue* value) const override {}
64 MOCK_METHOD0(Destruct, void()); 64 MOCK_METHOD0(Destruct, void());
65 }; 65 };
66 66
67 TEST(ListContainerTest, ConstructorCalledInAllocateAndConstruct) { 67 TEST(ListContainerTest, ConstructorCalledInAllocateAndConstruct) {
68 ListContainer<DrawQuad> list(sizeof(kLargestDrawQuad)); 68 ListContainer<DrawQuad> list(sizeof(kLargestDrawQuad));
69 69
70 size_t size = 2; 70 size_t size = 2;
71 SimpleDrawQuadConstructMagicNumberOne* dq_1 = 71 SimpleDrawQuadConstructMagicNumberOne* dq_1 =
72 list.AllocateAndConstruct<SimpleDrawQuadConstructMagicNumberOne>(); 72 list.AllocateAndConstruct<SimpleDrawQuadConstructMagicNumberOne>();
73 SimpleDrawQuadConstructMagicNumberTwo* dq_2 = 73 SimpleDrawQuadConstructMagicNumberTwo* dq_2 =
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 for (ListContainer<SharedQuadState>::ReverseIterator iter = list.rbegin(); 547 for (ListContainer<SharedQuadState>::ReverseIterator iter = list.rbegin();
548 iter != list.rend(); 548 iter != list.rend();
549 ++iter) { 549 ++iter) {
550 EXPECT_EQ(i, iter.index()); 550 EXPECT_EQ(i, iter.index());
551 ++i; 551 ++i;
552 } 552 }
553 } 553 }
554 554
555 } // namespace 555 } // namespace
556 } // namespace cc 556 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/io_surface_draw_quad.h ('k') | cc/quads/picture_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698