| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 "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/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 EXPECT_EQ(2, CopyLogger::TimesConstructed); | 119 EXPECT_EQ(2, CopyLogger::TimesConstructed); |
| 120 EXPECT_EQ(1, CopyLogger::TimesCopied); | 120 EXPECT_EQ(1, CopyLogger::TimesCopied); |
| 121 | 121 |
| 122 // Now they should be different, since the function call will make a copy. | 122 // Now they should be different, since the function call will make a copy. |
| 123 res = false; | 123 res = false; |
| 124 DispatchToFunction(&SomeLoggerMethCopy, tuple); | 124 DispatchToFunction(&SomeLoggerMethCopy, tuple); |
| 125 EXPECT_FALSE(res); | 125 EXPECT_FALSE(res); |
| 126 EXPECT_EQ(3, CopyLogger::TimesConstructed); | 126 EXPECT_EQ(3, CopyLogger::TimesConstructed); |
| 127 EXPECT_EQ(2, CopyLogger::TimesCopied); | 127 EXPECT_EQ(2, CopyLogger::TimesCopied); |
| 128 } | 128 } |
| OLD | NEW |