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

Side by Side Diff: base/values_unittest.cc

Issue 10004001: Add virtual and OVERRIDE to base/ implementation files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win Fix -> Missing header Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | no next file » | 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 #include <limits> 5 #include <limits>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 explicit DeletionTestValue(bool* deletion_flag) : Value(TYPE_NULL) { 168 explicit DeletionTestValue(bool* deletion_flag) : Value(TYPE_NULL) {
169 Init(deletion_flag); // Separate function so that we can use ASSERT_* 169 Init(deletion_flag); // Separate function so that we can use ASSERT_*
170 } 170 }
171 171
172 void Init(bool* deletion_flag) { 172 void Init(bool* deletion_flag) {
173 ASSERT_TRUE(deletion_flag); 173 ASSERT_TRUE(deletion_flag);
174 deletion_flag_ = deletion_flag; 174 deletion_flag_ = deletion_flag;
175 *deletion_flag_ = false; 175 *deletion_flag_ = false;
176 } 176 }
177 177
178 ~DeletionTestValue() { 178 virtual ~DeletionTestValue() {
179 *deletion_flag_ = true; 179 *deletion_flag_ = true;
180 } 180 }
181 181
182 private: 182 private:
183 bool* deletion_flag_; 183 bool* deletion_flag_;
184 }; 184 };
185 185
186 TEST(ValuesTest, ListDeletion) { 186 TEST(ValuesTest, ListDeletion) {
187 bool deletion_flag = true; 187 bool deletion_flag = true;
188 188
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 seen2 = true; 749 seen2 = true;
750 } else { 750 } else {
751 ADD_FAILURE(); 751 ADD_FAILURE();
752 } 752 }
753 } 753 }
754 EXPECT_TRUE(seen1); 754 EXPECT_TRUE(seen1);
755 EXPECT_TRUE(seen2); 755 EXPECT_TRUE(seen2);
756 } 756 }
757 757
758 } // namespace base 758 } // namespace base
OLDNEW
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698