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

Side by Side Diff: base/memory/ptr_util_unittest.cc

Issue 1549003002: Switch to standard integer types in base/memory/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « base/memory/memory_pressure_monitor_win_unittest.cc ('k') | base/memory/ref_counted.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 6
7 #include <stddef.h>
8
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace base { 11 namespace base {
10 12
11 namespace { 13 namespace {
12 14
13 class DeleteCounter { 15 class DeleteCounter {
14 public: 16 public:
15 DeleteCounter() { ++count_; } 17 DeleteCounter() { ++count_; }
16 ~DeleteCounter() { --count_; } 18 ~DeleteCounter() { --count_; }
(...skipping 12 matching lines...) Expand all
29 EXPECT_EQ(0u, DeleteCounter::count()); 31 EXPECT_EQ(0u, DeleteCounter::count());
30 DeleteCounter* counter = new DeleteCounter; 32 DeleteCounter* counter = new DeleteCounter;
31 EXPECT_EQ(1u, DeleteCounter::count()); 33 EXPECT_EQ(1u, DeleteCounter::count());
32 std::unique_ptr<DeleteCounter> owned_counter = WrapUnique(counter); 34 std::unique_ptr<DeleteCounter> owned_counter = WrapUnique(counter);
33 EXPECT_EQ(1u, DeleteCounter::count()); 35 EXPECT_EQ(1u, DeleteCounter::count());
34 owned_counter.reset(); 36 owned_counter.reset();
35 EXPECT_EQ(0u, DeleteCounter::count()); 37 EXPECT_EQ(0u, DeleteCounter::count());
36 } 38 }
37 39
38 } // namespace base 40 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/memory_pressure_monitor_win_unittest.cc ('k') | base/memory/ref_counted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698