Chromium Code Reviews| Index: base/functional_unittest.cc |
| diff --git a/base/functional_unittest.cc b/base/functional_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0dec075a1ccd70697d9e25229112aba54d59bcbb |
| --- /dev/null |
| +++ b/base/functional_unittest.cc |
| @@ -0,0 +1,26 @@ |
| +// 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" |
|
danakj
2017/06/26 19:33:12
this file should be in base/test/, especially if i
dyaroshev
2017/06/26 22:40:43
Done.
|
| +#include "base/containers/flat_tree.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace base { |
| + |
|
danakj
2017/06/26 19:33:12
nit: remove whitespace
dyaroshev
2017/06/26 22:40:43
Not applicable.
|
| +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)); |
| + |
| + static_assert(base::internal::IsTransparentCompare<base::less>::value, ""); |
| +} |
| + |
| +} // namespace |
| + |
|
danakj
2017/06/26 19:33:12
nit: remove whitespace
dyaroshev
2017/06/26 22:40:43
Not applicable.
|
| +} // namespace base |