| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/memory/linked_ptr.h" | 7 #include "base/memory/linked_ptr.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 int num = 0; | 13 int num = 0; |
| 14 | 14 |
| 15 std::string history; | 15 std::string history; |
| 16 | 16 |
| 17 // Class which tracks allocation/deallocation | 17 // Class which tracks allocation/deallocation |
| 18 struct A { | 18 struct A { |
| 19 A(): mynum(num++) { history += base::StringPrintf("A%d ctor\n", mynum); } | 19 A(): mynum(num++) { history += base::StringPrintf("A%d ctor\n", mynum); } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 "A2 dtor\n" | 99 "A2 dtor\n" |
| 100 "A0 use\n" | 100 "A0 use\n" |
| 101 "A0 use\n" | 101 "A0 use\n" |
| 102 "A1 use\n" | 102 "A1 use\n" |
| 103 "A3 ctor\n" | 103 "A3 ctor\n" |
| 104 "A0 dtor\n" | 104 "A0 dtor\n" |
| 105 "A3 dtor\n" | 105 "A3 dtor\n" |
| 106 "A1 dtor\n" | 106 "A1 dtor\n" |
| 107 ); | 107 ); |
| 108 } | 108 } |
| OLD | NEW |