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

Unified Diff: base/functional_unittest.cc

Issue 2944523002: Improving flat containers interface. (Closed)
Patch Set: Review, round 1. Created 3 years, 6 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
Index: base/functional_unittest.cc
diff --git a/base/functional_unittest.cc b/base/functional_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e0c3100ed9f90fa7b4065502f7e249c0fc1d3578
--- /dev/null
+++ b/base/functional_unittest.cc
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/functional.h"
+
+#include "base/containers/container_test_utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace base {
+
+namespace {
+
+TEST(Functional, Less) {
+ using ExplicitInt = base::MoveOnlyInt;
+ EXPECT_TRUE(base::less()(ExplicitInt(3), 4));
+ EXPECT_FALSE(base::less()(4, ExplicitInt(3)));
+ EXPECT_TRUE(base::less()(3, 4));
+}
+
+} // namespace
+
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698