summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/STLExtrasTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/STLExtrasTest.cpp')
-rw-r--r--llvm/unittests/ADT/STLExtrasTest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/unittests/ADT/STLExtrasTest.cpp b/llvm/unittests/ADT/STLExtrasTest.cpp
index ebb8c9f6f5d..8704ddda265 100644
--- a/llvm/unittests/ADT/STLExtrasTest.cpp
+++ b/llvm/unittests/ADT/STLExtrasTest.cpp
@@ -469,13 +469,14 @@ TEST(STLExtrasTest, to_address) {
EXPECT_EQ(V1, to_address(V3));
}
-TEST(STLExtrasTest, bsearch) {
+TEST(STLExtrasTest, partition_point) {
std::vector<int> V = {1, 3, 5, 7, 9};
// Range version.
- EXPECT_EQ(V.begin() + 3, bsearch(V, [](unsigned X) { return X >= 7; }));
- EXPECT_EQ(V.begin(), bsearch(V, [](unsigned X) { return X >= 1; }));
- EXPECT_EQ(V.end(), bsearch(V, [](unsigned X) { return X >= 50; }));
+ EXPECT_EQ(V.begin() + 3,
+ partition_point(V, [](unsigned X) { return X < 7; }));
+ EXPECT_EQ(V.begin(), partition_point(V, [](unsigned X) { return X < 1; }));
+ EXPECT_EQ(V.end(), partition_point(V, [](unsigned X) { return X < 50; }));
}
} // namespace
OpenPOWER on IntegriCloud