26 #include <boost/random.hpp> 36 using namespace folly;
42 #define VECTOR IntFBVector 45 #define VECTOR FBStringFBVector 64 auto const n =
random(0U, 10000U);
66 auto const n1 =
random(0U, 10000U);
94 class UserDefinedType {
140 vec = {0, 0, 12, 16};
159 std::unique_ptr<int> p(
new int(12));
165 v[0] = std::make_unique<int>(32);
166 std::unique_ptr<int> somePtr;
179 message += *node_name;
182 EXPECT_EQ(
"Cycle detected: [baz] [bar] [foo] ", message);
185 TEST(FBVector, move_iterator) {
190 std::make_move_iterator(cp1.begin()), std::make_move_iterator(cp1.end()));
196 std::make_move_iterator(cp2.begin()), std::make_move_iterator(cp2.end()));
203 std::make_move_iterator(cp3.begin()),
204 std::make_move_iterator(cp3.end()));
208 TEST(FBVector, reserve_consistency) {
214 for (
size_t i = 0;
i < 1000; ++
i) {
221 TEST(FBVector, vector_of_maps) {
224 v.
push_back(std::map<std::string, std::string>());
225 v.
push_back(std::map<std::string, std::string>());
229 v[1][
"hello"] =
"world";
238 TEST(FBVector, shrink_to_fit_after_clear) {
257 std::initializer_list<int> il = {};
Integral2 random(Integral1 low, Integral2 up)
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
void assign(It first, It last)
TEST(fbvector, clause_23_3_6_1_3_ambiguity)
void reserve(size_type n)
—— Concurrent Priority Queue Implementation ——
iterator begin() noexcept
void push_back(const T &value)
constexpr auto size(C const &c) -> decltype(c.size())
int randomObject< int >()
constexpr detail::Cycle< true > cycle
void shrink_to_fit() noexcept
FOLLY_ASSUME_FBVECTOR_COMPATIBLE(boost::optional< boost::optional< SharedMutexToken >>) template< typename Lock
void emplace_back(Args &&...args)
size_type capacity() const noexcept
#define EXPECT_FALSE(condition)
size_type size() const noexcept
iterator insert(const_iterator cpos, const T &value)