OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/functional.h" |
| 6 |
| 7 #include "base/containers/container_test_utils.h" |
| 8 #include "base/containers/flat_tree.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 |
| 11 namespace base { |
| 12 |
| 13 namespace { |
| 14 |
| 15 TEST(Functional, Less) { |
| 16 using ExplicitInt = base::MoveOnlyInt; |
| 17 EXPECT_TRUE(base::less()(ExplicitInt(3), 4)); |
| 18 EXPECT_FALSE(base::less()(4, ExplicitInt(3))); |
| 19 EXPECT_TRUE(base::less()(3, 4)); |
| 20 |
| 21 static_assert(base::internal::IsTransparentCompare<base::less>::value, ""); |
| 22 } |
| 23 |
| 24 } // namespace |
| 25 |
| 26 } // namespace base |
OLD | NEW |