1 // Copyright 2020 The Chromium Authors
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/ranges/functional.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace base {
10
TEST(RangesTest,EqualTo)11 TEST(RangesTest, EqualTo) {
12 ranges::equal_to eq;
13 EXPECT_TRUE(eq(0, 0));
14 EXPECT_FALSE(eq(0, 1));
15 EXPECT_FALSE(eq(1, 0));
16 }
17
TEST(RangesTest,Less)18 TEST(RangesTest, Less) {
19 ranges::less lt;
20 EXPECT_FALSE(lt(0, 0));
21 EXPECT_TRUE(lt(0, 1));
22 EXPECT_FALSE(lt(1, 0));
23 }
24
25 } // namespace base
26