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 "base/bind.h" | 5 #include "base/bind.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 int ArrayGet(const int array[], int n) { | 174 int ArrayGet(const int array[], int n) { |
175 return array[n]; | 175 return array[n]; |
176 } | 176 } |
177 | 177 |
178 int Sum(int a, int b, int c, int d, int e, int f) { | 178 int Sum(int a, int b, int c, int d, int e, int f) { |
179 return a + b + c + d + e + f; | 179 return a + b + c + d + e + f; |
180 } | 180 } |
181 | 181 |
182 void OutputSum(int* output, int a, int b, int c, int d, int e) { | |
183 *output = a + b + c + d + e; | |
184 } | |
185 | |
186 const char* CStringIdentity(const char* s) { | 182 const char* CStringIdentity(const char* s) { |
187 return s; | 183 return s; |
188 } | 184 } |
189 | 185 |
190 int GetCopies(const CopyCounter& counter) { | 186 int GetCopies(const CopyCounter& counter) { |
191 return counter.copies(); | 187 return counter.copies(); |
192 } | 188 } |
193 | 189 |
194 int UnwrapNoRefParent(NoRefParent p) { | 190 int UnwrapNoRefParent(NoRefParent p) { |
195 return p.value; | 191 return p.value; |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 Callback<int(void)> fastcall_cb = Bind(&FastCallFunc, 1); | 793 Callback<int(void)> fastcall_cb = Bind(&FastCallFunc, 1); |
798 EXPECT_EQ(1, fastcall_cb.Run()); | 794 EXPECT_EQ(1, fastcall_cb.Run()); |
799 | 795 |
800 Callback<int(void)> stdcall_cb = Bind(&StdCallFunc, 2); | 796 Callback<int(void)> stdcall_cb = Bind(&StdCallFunc, 2); |
801 EXPECT_EQ(2, stdcall_cb.Run()); | 797 EXPECT_EQ(2, stdcall_cb.Run()); |
802 } | 798 } |
803 #endif | 799 #endif |
804 | 800 |
805 } // namespace | 801 } // namespace |
806 } // namespace base | 802 } // namespace base |
OLD | NEW |