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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stl_util_unittest.cc
diff --git a/base/stl_util_unittest.cc b/base/stl_util_unittest.cc
index a3f8e16f2ce2c0a5411d1491254245c80d89ab3d..0e05e4b125f5ce377890268f576386ba2127d0d6 100644
--- a/base/stl_util_unittest.cc
+++ b/base/stl_util_unittest.cc
@@ -238,5 +238,13 @@ TEST(STLUtilTest, STLIncludes) {
EXPECT_TRUE(STLIncludes<std::set<int> >(a3, a2));
}
+TEST(STLUtilTest, LambdaForEach) {
+ std::vector<int> numbers;
+ numbers.push_back(1);
+ numbers.push_back(2);
+ std::for_each(numbers.begin(), numbers.end(),
+ [](int i) { LOG(INFO) << i; });
+}
+
} // namespace
} // namespace base
« 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