| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/tuple.h" | 5 #include "base/tuple.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 void DoAdd(int a, int b, int c, int* res) { | 14 void DoAdd(int a, int b, int c, int* res) { |
| 15 *res = a + b + c; | 15 *res = a + b + c; |
| 16 } | 16 } |
| 17 | 17 |
| 18 struct Addy { | 18 struct Addy { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // Now they should be different, since the function call will make a copy. | 126 // Now they should be different, since the function call will make a copy. |
| 127 res = false; | 127 res = false; |
| 128 DispatchToFunction(&SomeLoggerMethCopy, tuple); | 128 DispatchToFunction(&SomeLoggerMethCopy, tuple); |
| 129 EXPECT_FALSE(res); | 129 EXPECT_FALSE(res); |
| 130 EXPECT_EQ(3, CopyLogger::TimesConstructed); | 130 EXPECT_EQ(3, CopyLogger::TimesConstructed); |
| 131 EXPECT_EQ(2, CopyLogger::TimesCopied); | 131 EXPECT_EQ(2, CopyLogger::TimesCopied); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace base | 134 } // namespace base |
| OLD | NEW |