| Index: base/containers/flat_set_unittest.cc
|
| diff --git a/base/containers/flat_set_unittest.cc b/base/containers/flat_set_unittest.cc
|
| index dc024fcf0a9729a15d4987e3980da46306a6b143..27d709372b03a16b53e3a6404740943eec09d8b7 100644
|
| --- a/base/containers/flat_set_unittest.cc
|
| +++ b/base/containers/flat_set_unittest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "base/containers/flat_set.h"
|
|
|
| +#include <memory>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -90,4 +91,27 @@ TEST(FlatSet, CopySwap) {
|
| EXPECT_THAT(copy, ElementsAre(1, 2));
|
| }
|
|
|
| +TEST(FlatSet, UniquePtrs) {
|
| + base::flat_set<std::unique_ptr<int>> s;
|
| + const auto& s1 = s;
|
| + int x = 0;
|
| + s.count(&x);
|
| + s1.count(&x);
|
| + s.find(&x);
|
| + s1.find(&x);
|
| + s.equal_range(&x);
|
| + s1.equal_range(&x);
|
| + s.lower_bound(&x);
|
| + s1.lower_bound(&x);
|
| + s.upper_bound(&x);
|
| + s1.upper_bound(&x);
|
| + s.erase(&x);
|
| +
|
| + // Check if we broke overload resolution.
|
| + s.emplace(new int(0));
|
| + s.emplace(new int(1));
|
| + s.erase(s.begin());
|
| + s.erase(s.cbegin());
|
| +}
|
| +
|
| } // namespace base
|
|
|