| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <memory> |
| 11 #include <sstream> | 12 #include <sstream> |
| 12 #include <string> | 13 #include <string> |
| 13 #include <utility> | 14 #include <utility> |
| 14 #include <vector> | 15 #include <vector> |
| 15 | 16 |
| 16 #include "webrtc/base/gunit.h" | 17 #include "webrtc/base/gunit.h" |
| 17 #include "webrtc/base/optional.h" | 18 #include "webrtc/base/optional.h" |
| 18 | 19 |
| 19 namespace rtc { | 20 namespace rtc { |
| 20 | 21 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 friend bool operator==(const Logger& a, const Logger& b) { | 58 friend bool operator==(const Logger& a, const Logger& b) { |
| 58 Log2("operator==", a, b); | 59 Log2("operator==", a, b); |
| 59 return a.origin_ == b.origin_; | 60 return a.origin_ == b.origin_; |
| 60 } | 61 } |
| 61 friend bool operator!=(const Logger& a, const Logger& b) { | 62 friend bool operator!=(const Logger& a, const Logger& b) { |
| 62 Log2("operator!=", a, b); | 63 Log2("operator!=", a, b); |
| 63 return a.origin_ != b.origin_; | 64 return a.origin_ != b.origin_; |
| 64 } | 65 } |
| 65 void Foo() { Log("Foo()"); } | 66 void Foo() { Log("Foo()"); } |
| 66 void Foo() const { Log("Foo() const"); } | 67 void Foo() const { Log("Foo() const"); } |
| 67 static rtc::scoped_ptr<std::vector<std::string>> Setup() { | 68 static std::unique_ptr<std::vector<std::string>> Setup() { |
| 68 rtc::scoped_ptr<std::vector<std::string>> s(new std::vector<std::string>); | 69 std::unique_ptr<std::vector<std::string>> s(new std::vector<std::string>); |
| 69 g_log = s.get(); | 70 g_log = s.get(); |
| 70 g_next_id = 0; | 71 g_next_id = 0; |
| 71 return s; | 72 return s; |
| 72 } | 73 } |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 int id_; | 76 int id_; |
| 76 int origin_; | 77 int origin_; |
| 77 static std::vector<std::string>* g_log; | 78 static std::vector<std::string>* g_log; |
| 78 static int g_next_id; | 79 static int g_next_id; |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 "4:17. copy constructor (from 0:17)", "5:5. default constructor", | 481 "4:17. copy constructor (from 0:17)", "5:5. default constructor", |
| 481 "6:6. default constructor", "7:7. default constructor", "---", | 482 "6:6. default constructor", "7:7. default constructor", "---", |
| 482 "swap 2:42, 3:17", "swap 4:5, 5:17", "swap 6:7, 7:6", "---", | 483 "swap 2:42, 3:17", "swap 4:5, 5:17", "swap 6:7, 7:6", "---", |
| 483 "7:6. destructor", "6:7. destructor", "5:17. destructor", | 484 "7:6. destructor", "6:7. destructor", "5:17. destructor", |
| 484 "4:5. destructor", "3:17. destructor", "2:42. destructor", | 485 "4:5. destructor", "3:17. destructor", "2:42. destructor", |
| 485 "1:42. destructor", "0:17. destructor"), | 486 "1:42. destructor", "0:17. destructor"), |
| 486 *log); | 487 *log); |
| 487 } | 488 } |
| 488 | 489 |
| 489 } // namespace rtc | 490 } // namespace rtc |
| OLD | NEW |