Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: base/stl_util_unittest.cc

Issue 598273002: NOT FOR COMMIT: Test using lambda with std::for_each (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/stl_util.h" 5 #include "base/stl_util.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 a3.insert(5); 231 a3.insert(5);
232 232
233 EXPECT_TRUE(STLIncludes<std::set<int> >(a1, a2)); 233 EXPECT_TRUE(STLIncludes<std::set<int> >(a1, a2));
234 EXPECT_FALSE(STLIncludes<std::set<int> >(a1, a3)); 234 EXPECT_FALSE(STLIncludes<std::set<int> >(a1, a3));
235 EXPECT_FALSE(STLIncludes<std::set<int> >(a2, a1)); 235 EXPECT_FALSE(STLIncludes<std::set<int> >(a2, a1));
236 EXPECT_FALSE(STLIncludes<std::set<int> >(a2, a3)); 236 EXPECT_FALSE(STLIncludes<std::set<int> >(a2, a3));
237 EXPECT_FALSE(STLIncludes<std::set<int> >(a3, a1)); 237 EXPECT_FALSE(STLIncludes<std::set<int> >(a3, a1));
238 EXPECT_TRUE(STLIncludes<std::set<int> >(a3, a2)); 238 EXPECT_TRUE(STLIncludes<std::set<int> >(a3, a2));
239 } 239 }
240 240
241 TEST(STLUtilTest, LambdaForEach) {
242 std::vector<int> numbers;
243 numbers.push_back(1);
244 numbers.push_back(2);
245 std::for_each(numbers.begin(), numbers.end(),
246 [](int i) { LOG(INFO) << i; });
247 }
248
241 } // namespace 249 } // namespace
242 } // namespace base 250 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698