proxygen
StlVectorTest.cpp File Reference
#include <folly/FBVector.h>
#include <climits>
#include <cstddef>
#include <exception>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <typeinfo>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/preprocessor.hpp>
#include <folly/Conv.h>
#include <folly/Portability.h>
#include <folly/ScopeGuard.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>

Go to the source code of this file.

Classes

struct  D0< b >
 
struct  D0< true >
 
struct  D1< b >
 
struct  D1< true >
 
struct  D2< b >
 
struct  D2< true >
 
struct  D3< b >
 
struct  D3< true >
 
struct  D4< b >
 
struct  D4< true >
 
struct  Delete< f >
 
struct  TickException
 
struct  Ticker
 
struct  DataTicker< f >
 
class  Counter
 
struct  Tracker
 
struct  DataTracker< isRelocatable >
 
struct  Data< f, pad >
 
struct  folly::IsRelocatable< Data< f, pad > >
 
struct  isPropCopy< T >
 
struct  isPropCopy< Data< f, pad > >
 
struct  isPropMove< T >
 
struct  isPropMove< Data< f, pad > >
 
struct  isPropSwap< T >
 
struct  isPropSwap< Data< f, pad > >
 
struct  AllocTracker
 
struct  Alloc< T >
 
struct  is_copy_constructibleAndAssignable< T >
 
struct  is_move_constructibleAndAssignable< T >
 
struct  customAllocator< Vector >
 
struct  special_move_assignable< T >
 
struct  special_move_assignable< Data< f, pad > >
 
struct  PrettyType< T >
 
struct  PrettyType< Data< f, pad > >
 
struct  PrettyType< std::allocator< T > >
 
struct  PrettyType< Alloc< T > >
 
struct  allocGen< A >
 
struct  allocGen< Alloc< T > >
 
class  DataState< Vector >
 
class  Transformer< It, tag >
 

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 

Macros

#define VECTOR_   folly::fbvector
 
#define IBOOST_PP_VARIADIC_SIZE(...)
 
#define IBOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...)   size
 
#define IBOOST_PP_VARIADIC_TO_SEQ(...)   BOOST_PP_TUPLE_TO_SEQ(IBOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__))
 
#define GEN_TEST(r, name, type)
 
#define GEN_TYPE_TEST(r, name, type)
 
#define GEN_RUNNABLE_TEST(r, name, type)   one = test_I_##name##3 < type > () || one;
 
#define GEN_LOOPER(r, d, arg)   BOOST_PP_CAT(LOOPER_, arg)
 
#define GEN_VMAKER(r, d, arg)
 
#define GEN_UMAKER(r, d, arg)
 
#define GEN_CLOSER(r, d, arg)   BOOST_PP_CAT(CLOSER_, arg)
 
#define TYPIFY(r, d, name)   BOOST_PP_CAT(TYPIFY_, name)
 
#define ARGIFY(r, d, name)   TYPIFY(r, d, name) name
 
#define MAKE_TEST(ref, name, types, restriction, argseq, ...)
 
#define DECL(name, ...)
 
#define STL_TEST_I(ref, name, restriction, ...)
 
#define STL_TEST(ref, name, restriction, ...)   STL_TEST_I(ref, name, restriction, z, ##__VA_ARGS__, ticks)
 
#define TEST_TYPES   (_TVIS)(_TVI)(_TV1)(_TV2)(_TV3)(_TV4)(_TV5v1)(_TV5)(_TP1)(_TP2)(_TP3)
 
#define INTERFACE_TYPES
 
#define SETUP   hardReset();
 
#define TEARDOWN
 
#define TYPIFY_z   std::nullptr_t
 
#define LOOPER_z
 
#define VMAKER_z   std::nullptr_t z = nullptr;
 
#define UMAKER_z
 
#define CLOSER_z
 
#define VERIFICATION
 
#define TYPIFY_ticks   int
 
#define LOOPER_ticks
 
#define VMAKER_ticks
 
#define UMAKER_ticks
 
#define CLOSER_ticks   }
 
#define TYPIFY_a   Vector&
 
#define LOOPER_a   for (const auto& a_ss : VectorSizes) {
 
#define VMAKER_a
 
#define UMAKER_a
 
#define CLOSER_a   }
 
#define TYPIFY_b   Vector&
 
#define LOOPER_b   for (int b_i = -2; b_i < (int)VectorSizes.size(); ++b_i) {
 
#define VMAKER_b
 
#define UMAKER_b
 
#define CLOSER_b   }
 
#define TYPIFY_n   int
 
#define LOOPER_n   for (int n : nSizes) {
 
#define VMAKER_n
 
#define UMAKER_n
 
#define CLOSER_n   }
 
#define TYPIFY_i   int*
 
#define LOOPER_i
 
#define VMAKER_i
 
#define UMAKER_i
 
#define CLOSER_i
 
#define TYPIFY_j   int*
 
#define LOOPER_j   for (int j_i = 0; j_i < 12; ++j_i) {
 
#define VMAKER_j
 
#define UMAKER_j
 
#define CLOSER_j   }
 
#define TYPIFY_p   typename Vector::iterator
 
#define LOOPER_p   for (int p_i = 0; p_i < 4; ++p_i) {
 
#define VMAKER_p
 
#define UMAKER_p
 
#define CLOSER_p   }
 
#define TYPIFY_q   typename Vector::iterator
 
#define LOOPER_q   for (int q_i = p_i; q_i < 4; ++q_i) {
 
#define VMAKER_q
 
#define UMAKER_q
 
#define CLOSER_q   }
 
#define TYPIFY_t   typename Vector::value_type&
 
#define LOOPER_t   for (int t_v : tVals) {
 
#define VMAKER_t
 
#define UMAKER_t
 
#define CLOSER_t   }
 
#define TYPIFY_m   typename Vector::allocator_type
 
#define LOOPER_m
 
#define VMAKER_m
 
#define UMAKER_m
 
#define CLOSER_m   }
 

Typedefs

typedef uint32_t Flags
 
typedef Data ED1
 
typedef Data< 0, 4080 > ED2
 
typedef Data< MC_NOEXCEPTED3
 
typedef Data< MC_NOEXCEPT|CC_DELETEED4
 
typedef Data< IS_RELOCATABLEED5
 
typedef folly::fbvector< int, std::allocator< int > > _TVIS
 
typedef folly::fbvector< int, Alloc< int > > _TVI
 
typedef folly::fbvector< ED1, std::allocator< ED1 > > _TV1
 
typedef folly::fbvector< ED2, std::allocator< ED2 > > _TV2
 
typedef folly::fbvector< ED3, std::allocator< ED3 > > _TV3
 
typedef folly::fbvector< ED4, std::allocator< ED4 > > _TV4
 
typedef folly::fbvector< ED5, std::allocator< ED5 > > _TV5v1
 
typedef folly::fbvector< ED5, Alloc< ED5 > > _TV5
 
typedef Data< PROP_COPYEP1
 
typedef Data< PROP_MOVEEP2
 
typedef Data< PROP_SWAPEP3
 
typedef folly::fbvector< EP1, Alloc< EP1 > > _TP1
 
typedef folly::fbvector< EP2, Alloc< EP2 > > _TP2
 
typedef folly::fbvector< EP3, Alloc< EP3 > > _TP3
 
typedef Data< ALL_DELETEDD1
 
typedef Data< DC_DELETE|CC_DELETE|MC_DELETEDD2
 
typedef Data< CA_DELETE|MA_DELETEDD3
 
typedef Data< CC_DELETE|MC_DELETEDD4
 
typedef Data< ALL_DELETE &~DC_DELETEDD5
 
typedef Data< CC_DELETEDD6
 
typedef Data< CA_DELETEDD7
 
typedef Data< ALL_DELETE|PROP_MOVEDDSMA
 
typedef folly::fbvector< DDSMA, Alloc< DDSMA > > _TSpecialMA
 

Enumerations

enum  FlagVals : Flags {
  DC_NOEXCEPT = 0x1, DC_THROW = 0x2, DC_DELETE = 0x8000, CC_NOEXCEPT = 0x4,
  CC_THROW = 0x8, CC_DELETE = 0x10000, MC_NOEXCEPT = 0x10, MC_THROW = 0x20,
  MC_DELETE = 0x20000, OC_NOEXCEPT = 0x40, OC_THROW = 0x80, CA_NOEXCEPT = 0x100,
  CA_THROW = 0x200, CA_DELETE = 0x40000, MA_NOEXCEPT = 0x400, MA_THROW = 0x800,
  MA_DELETE = 0x80000, ALL_DELETE = DC_DELETE | CC_DELETE | MC_DELETE | CA_DELETE | MA_DELETE, IS_RELOCATABLE = 0x2000, PROP_COPY = 0x100000,
  PROP_MOVE = 0x200000, PROP_SWAP = 0x400000
}
 

Functions

void softReset (int ticks=-1)
 
void hardReset ()
 
int getTotal ()
 
void isSane ()
 
uint64_t ReadTSC ()
 
template<class Vector >
void populate (Vector &v, const pair< int, int > &ss)
 
template<class Vector >
std::pair< typename Vector::iterator, stringiterSpotter (Vector &v, int i)
 
template<class Vector >
void verifyVector (const Vector &v)
 
void verifyAllocator (int ele, int cap)
 
template<class Vector >
void verify (int extras)
 
template<class Vector >
void verify (int extras, const Vector &v)
 
template<class Vector >
void verify (int extras, const Vector &v1, const Vector &v2)
 
int convertToInt (int t)
 
template<Flags f, size_t pad>
int convertToInt (const Data< f, pad > &t)
 
template<typename T >
int convertToInt (const std::allocator< T > &)
 
template<typename T >
int convertToInt (const Alloc< T > &a)
 
template<typename It >
Transformer< It, forward_iterator_tag > makeForwardIterator (const It &it)
 
template<typename It >
Transformer< It, input_iterator_tag > makeInputIterator (const It &it)
 
void mutate (int &i)
 
void mutate (uint64_t &i)
 
template<Flags f, size_t pad>
void mutate (Data< f, pad > &ds)
 
template<class Vector , typename T , typename Allocator >
void test_containerTypedefs (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_containerTypedefs2 (std::false_type)
 
template<class Vector >
void test_containerTypedefs2 (std::true_type)
 
template<class Vector >
void test_containerTypedefs3 ()
 
template<class Vector >
bool test_I_containerTypedefs2 (std::false_type)
 
template<class Vector >
bool test_I_containerTypedefs2 (std::true_type)
 
template<class Vector >
bool test_I_containerTypedefs3 ()
 
 TEST (FBVector, containerTypedefs)
 
template<class Vector , typename T , typename Allocator >
void test_emptyConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_emptyConstruction2 (std::false_type)
 
template<class Vector >
void test_emptyConstruction2 (std::true_type)
 
template<class Vector >
void test_emptyConstruction3 ()
 
template<class Vector >
bool test_I_emptyConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_emptyConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_emptyConstruction3 ()
 
 TEST (FBVector, emptyConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_populate (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_populate2 (std::false_type)
 
template<class Vector >
void test_populate2 (std::true_type)
 
template<class Vector >
void test_populate3 ()
 
template<class Vector >
bool test_I_populate2 (std::false_type)
 
template<class Vector >
bool test_I_populate2 (std::true_type)
 
template<class Vector >
bool test_I_populate3 ()
 
 TEST (FBVector, populate)
 
template<class Vector , typename T , typename Allocator >
void test_copyConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_copyConstruction2 (std::false_type)
 
template<class Vector >
void test_copyConstruction2 (std::true_type)
 
template<class Vector >
void test_copyConstruction3 ()
 
template<class Vector >
bool test_I_copyConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_copyConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_copyConstruction3 ()
 
 TEST (FBVector, copyConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_moveConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_moveConstruction2 (std::false_type)
 
template<class Vector >
void test_moveConstruction2 (std::true_type)
 
template<class Vector >
void test_moveConstruction3 ()
 
template<class Vector >
bool test_I_moveConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_moveConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_moveConstruction3 ()
 
 TEST (FBVector, moveConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_moveAssignment (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks)))))
 
template<class Vector >
void test_moveAssignment2 (std::false_type)
 
template<class Vector >
void test_moveAssignment2 (std::true_type)
 
template<class Vector >
void test_moveAssignment3 ()
 
template<class Vector >
bool test_I_moveAssignment2 (std::false_type)
 
template<class Vector >
bool test_I_moveAssignment2 (std::true_type)
 
template<class Vector >
bool test_I_moveAssignment3 ()
 
 TEST (FBVector, moveAssignment)
 
template<class Vector , typename T , typename Allocator >
void test_destructible (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_destructible2 (std::false_type)
 
template<class Vector >
void test_destructible2 (std::true_type)
 
template<class Vector >
void test_destructible3 ()
 
template<class Vector >
bool test_I_destructible2 (std::false_type)
 
template<class Vector >
bool test_I_destructible2 (std::true_type)
 
template<class Vector >
bool test_I_destructible3 ()
 
 TEST (FBVector, destructible)
 
template<class Vector , typename T , typename Allocator >
void test_iterators (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_iterators2 (std::false_type)
 
template<class Vector >
void test_iterators2 (std::true_type)
 
template<class Vector >
void test_iterators3 ()
 
template<class Vector >
bool test_I_iterators2 (std::false_type)
 
template<class Vector >
bool test_I_iterators2 (std::true_type)
 
template<class Vector >
bool test_I_iterators3 ()
 
 TEST (FBVector, iterators)
 
template<class Vector , typename T , typename Allocator >
void test_equitable (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks)))))
 
template<class Vector >
void test_equitable2 (std::false_type)
 
template<class Vector >
void test_equitable2 (std::true_type)
 
template<class Vector >
void test_equitable3 ()
 
template<class Vector >
bool test_I_equitable2 (std::false_type)
 
template<class Vector >
bool test_I_equitable2 (std::true_type)
 
template<class Vector >
bool test_I_equitable3 ()
 
 TEST (FBVector, equitable)
 
template<class Vector , typename T , typename Allocator >
void test_memberSwappable (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks)))))
 
template<class Vector >
void test_memberSwappable2 (std::false_type)
 
template<class Vector >
void test_memberSwappable2 (std::true_type)
 
template<class Vector >
void test_memberSwappable3 ()
 
template<class Vector >
bool test_I_memberSwappable2 (std::false_type)
 
template<class Vector >
bool test_I_memberSwappable2 (std::true_type)
 
template<class Vector >
bool test_I_memberSwappable3 ()
 
 TEST (FBVector, memberSwappable)
 
template<class Vector , typename T , typename Allocator >
void test_nonmemberSwappable (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks)))))
 
template<class Vector >
void test_nonmemberSwappable2 (std::false_type)
 
template<class Vector >
void test_nonmemberSwappable2 (std::true_type)
 
template<class Vector >
void test_nonmemberSwappable3 ()
 
template<class Vector >
bool test_I_nonmemberSwappable2 (std::false_type)
 
template<class Vector >
bool test_I_nonmemberSwappable2 (std::true_type)
 
template<class Vector >
bool test_I_nonmemberSwappable3 ()
 
 TEST (FBVector, nonmemberSwappable)
 
template<class Vector , typename T , typename Allocator >
void test_copyAssign (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks)))))
 
template<class Vector >
void test_copyAssign2 (std::false_type)
 
template<class Vector >
void test_copyAssign2 (std::true_type)
 
template<class Vector >
void test_copyAssign3 ()
 
template<class Vector >
bool test_I_copyAssign2 (std::false_type)
 
template<class Vector >
bool test_I_copyAssign2 (std::true_type)
 
template<class Vector >
bool test_I_copyAssign3 ()
 
 TEST (FBVector, copyAssign)
 
template<class Vector , typename T , typename Allocator >
void test_sizeops (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_sizeops2 (std::false_type)
 
template<class Vector >
void test_sizeops2 (std::true_type)
 
template<class Vector >
void test_sizeops3 ()
 
template<class Vector >
bool test_I_sizeops2 (std::false_type)
 
template<class Vector >
bool test_I_sizeops2 (std::true_type)
 
template<class Vector >
bool test_I_sizeops3 ()
 
 TEST (FBVector, sizeops)
 
template<class Vector , typename T , typename Allocator >
void test_reversibleContainerTypedefs (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_reversibleContainerTypedefs2 (std::false_type)
 
template<class Vector >
void test_reversibleContainerTypedefs2 (std::true_type)
 
template<class Vector >
void test_reversibleContainerTypedefs3 ()
 
template<class Vector >
bool test_I_reversibleContainerTypedefs2 (std::false_type)
 
template<class Vector >
bool test_I_reversibleContainerTypedefs2 (std::true_type)
 
template<class Vector >
bool test_I_reversibleContainerTypedefs3 ()
 
 TEST (FBVector, reversibleContainerTypedefs)
 
template<class Vector , typename T , typename Allocator >
void test_reversibleIterators (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_reversibleIterators2 (std::false_type)
 
template<class Vector >
void test_reversibleIterators2 (std::true_type)
 
template<class Vector >
void test_reversibleIterators3 ()
 
template<class Vector >
bool test_I_reversibleIterators2 (std::false_type)
 
template<class Vector >
bool test_I_reversibleIterators2 (std::true_type)
 
template<class Vector >
bool test_I_reversibleIterators3 ()
 
 TEST (FBVector, reversibleIterators)
 
template<class Vector , typename T , typename Allocator >
void test_comparable (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_comparable2 (std::false_type)
 
template<class Vector >
void test_comparable2 (std::true_type)
 
template<class Vector >
void test_comparable3 ()
 
template<class Vector >
bool test_I_comparable2 (std::false_type)
 
template<class Vector >
bool test_I_comparable2 (std::true_type)
 
template<class Vector >
bool test_I_comparable3 ()
 
 TEST (FBVector, comparable)
 
template<class Vector , typename T , typename Allocator >
void test_allocatorTypedefs (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_allocatorTypedefs2 (std::false_type)
 
template<class Vector >
void test_allocatorTypedefs2 (std::true_type)
 
template<class Vector >
void test_allocatorTypedefs3 ()
 
template<class Vector >
bool test_I_allocatorTypedefs2 (std::false_type)
 
template<class Vector >
bool test_I_allocatorTypedefs2 (std::true_type)
 
template<class Vector >
bool test_I_allocatorTypedefs3 ()
 
 TEST (FBVector, allocatorTypedefs)
 
template<class Vector , typename T , typename Allocator >
void test_getAllocator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_getAllocator2 (std::false_type)
 
template<class Vector >
void test_getAllocator2 (std::true_type)
 
template<class Vector >
void test_getAllocator3 ()
 
template<class Vector >
bool test_I_getAllocator2 (std::false_type)
 
template<class Vector >
bool test_I_getAllocator2 (std::true_type)
 
template<class Vector >
bool test_I_getAllocator3 ()
 
 TEST (FBVector, getAllocator)
 
template<class Vector , typename T , typename Allocator >
void test_defaultAllocator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_defaultAllocator2 (std::false_type)
 
template<class Vector >
void test_defaultAllocator2 (std::true_type)
 
template<class Vector >
void test_defaultAllocator3 ()
 
template<class Vector >
bool test_I_defaultAllocator2 (std::false_type)
 
template<class Vector >
bool test_I_defaultAllocator2 (std::true_type)
 
template<class Vector >
bool test_I_defaultAllocator3 ()
 
 TEST (FBVector, defaultAllocator)
 
template<class Vector , typename T , typename Allocator >
void test_customAllocator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, m, ticks)))))
 
template<class Vector >
void test_customAllocator2 (std::false_type)
 
template<class Vector >
void test_customAllocator2 (std::true_type)
 
template<class Vector >
void test_customAllocator3 ()
 
template<class Vector >
bool test_I_customAllocator2 (std::false_type)
 
template<class Vector >
bool test_I_customAllocator2 (std::true_type)
 
template<class Vector >
bool test_I_customAllocator3 ()
 
 TEST (FBVector, customAllocator)
 
template<class Vector , typename T , typename Allocator >
void test_copyWithAllocator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, m, ticks)))))
 
template<class Vector >
void test_copyWithAllocator2 (std::false_type)
 
template<class Vector >
void test_copyWithAllocator2 (std::true_type)
 
template<class Vector >
void test_copyWithAllocator3 ()
 
template<class Vector >
bool test_I_copyWithAllocator2 (std::false_type)
 
template<class Vector >
bool test_I_copyWithAllocator2 (std::true_type)
 
template<class Vector >
bool test_I_copyWithAllocator3 ()
 
 TEST (FBVector, copyWithAllocator)
 
template<class Vector , typename T , typename Allocator >
void test_moveConstructionWithAllocator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_moveConstructionWithAllocator2 (std::false_type)
 
template<class Vector >
void test_moveConstructionWithAllocator2 (std::true_type)
 
template<class Vector >
void test_moveConstructionWithAllocator3 ()
 
template<class Vector >
bool test_I_moveConstructionWithAllocator2 (std::false_type)
 
template<class Vector >
bool test_I_moveConstructionWithAllocator2 (std::true_type)
 
template<class Vector >
bool test_I_moveConstructionWithAllocator3 ()
 
 TEST (FBVector, moveConstructionWithAllocator)
 
template<class Vector , typename T , typename Allocator >
void test_moveConstructionWithAllocatorSupplied (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, m, ticks)))))
 
template<class Vector >
void test_moveConstructionWithAllocatorSupplied2 (std::false_type)
 
template<class Vector >
void test_moveConstructionWithAllocatorSupplied2 (std::true_type)
 
template<class Vector >
void test_moveConstructionWithAllocatorSupplied3 ()
 
template<class Vector >
bool test_I_moveConstructionWithAllocatorSupplied2 (std::false_type)
 
template<class Vector >
bool test_I_moveConstructionWithAllocatorSupplied2 (std::true_type)
 
template<class Vector >
bool test_I_moveConstructionWithAllocatorSupplied3 ()
 
 TEST (FBVector, moveConstructionWithAllocatorSupplied)
 
template<class Vector , typename T , typename Allocator >
void test_allocAssign (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_allocAssign2 (std::false_type)
 
template<class Vector >
void test_allocAssign2 (std::true_type)
 
template<class Vector >
void test_allocAssign3 ()
 
template<class Vector >
bool test_I_allocAssign2 (std::false_type)
 
template<class Vector >
bool test_I_allocAssign2 (std::true_type)
 
template<class Vector >
bool test_I_allocAssign3 ()
 
 TEST (FBVector, allocAssign)
 
template<class Vector , typename T , typename Allocator >
void test_nAllocConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, n, m, ticks)))))
 
template<class Vector >
void test_nAllocConstruction2 (std::false_type)
 
template<class Vector >
void test_nAllocConstruction2 (std::true_type)
 
template<class Vector >
void test_nAllocConstruction3 ()
 
template<class Vector >
bool test_I_nAllocConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_nAllocConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_nAllocConstruction3 ()
 
 TEST (FBVector, nAllocConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_nCopyAllocConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, n, t, m, ticks)))))
 
template<class Vector >
void test_nCopyAllocConstruction2 (std::false_type)
 
template<class Vector >
void test_nCopyAllocConstruction2 (std::true_type)
 
template<class Vector >
void test_nCopyAllocConstruction3 ()
 
template<class Vector >
bool test_I_nCopyAllocConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_nCopyAllocConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_nCopyAllocConstruction3 ()
 
 TEST (FBVector, nCopyAllocConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_forwardIteratorAllocConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, i, j, m, ticks)))))
 
template<class Vector >
void test_forwardIteratorAllocConstruction2 (std::false_type)
 
template<class Vector >
void test_forwardIteratorAllocConstruction2 (std::true_type)
 
template<class Vector >
void test_forwardIteratorAllocConstruction3 ()
 
template<class Vector >
bool test_I_forwardIteratorAllocConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_forwardIteratorAllocConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_forwardIteratorAllocConstruction3 ()
 
 TEST (FBVector, forwardIteratorAllocConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_inputIteratorAllocConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, i, j, m, ticks)))))
 
template<class Vector >
void test_inputIteratorAllocConstruction2 (std::false_type)
 
template<class Vector >
void test_inputIteratorAllocConstruction2 (std::true_type)
 
template<class Vector >
void test_inputIteratorAllocConstruction3 ()
 
template<class Vector >
bool test_I_inputIteratorAllocConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_inputIteratorAllocConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_inputIteratorAllocConstruction3 ()
 
 TEST (FBVector, inputIteratorAllocConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_ilAllocConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, m, ticks)))))
 
template<class Vector >
void test_ilAllocConstruction2 (std::false_type)
 
template<class Vector >
void test_ilAllocConstruction2 (std::true_type)
 
template<class Vector >
void test_ilAllocConstruction3 ()
 
template<class Vector >
bool test_I_ilAllocConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_ilAllocConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_ilAllocConstruction3 ()
 
 TEST (FBVector, ilAllocConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_dataRaces (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_dataRaces2 (std::false_type)
 
template<class Vector >
void test_dataRaces2 (std::true_type)
 
template<class Vector >
void test_dataRaces3 ()
 
template<class Vector >
bool test_I_dataRaces2 (std::false_type)
 
template<class Vector >
bool test_I_dataRaces2 (std::true_type)
 
template<class Vector >
bool test_I_dataRaces3 ()
 
 TEST (FBVector, dataRaces)
 
template<class Vector , typename T , typename Allocator >
void test_nConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, n, ticks)))))
 
template<class Vector >
void test_nConstruction2 (std::false_type)
 
template<class Vector >
void test_nConstruction2 (std::true_type)
 
template<class Vector >
void test_nConstruction3 ()
 
template<class Vector >
bool test_I_nConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_nConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_nConstruction3 ()
 
 TEST (FBVector, nConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_nCopyConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, n, t, ticks)))))
 
template<class Vector >
void test_nCopyConstruction2 (std::false_type)
 
template<class Vector >
void test_nCopyConstruction2 (std::true_type)
 
template<class Vector >
void test_nCopyConstruction3 ()
 
template<class Vector >
bool test_I_nCopyConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_nCopyConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_nCopyConstruction3 ()
 
 TEST (FBVector, nCopyConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_forwardIteratorConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, i, j, ticks)))))
 
template<class Vector >
void test_forwardIteratorConstruction2 (std::false_type)
 
template<class Vector >
void test_forwardIteratorConstruction2 (std::true_type)
 
template<class Vector >
void test_forwardIteratorConstruction3 ()
 
template<class Vector >
bool test_I_forwardIteratorConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_forwardIteratorConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_forwardIteratorConstruction3 ()
 
 TEST (FBVector, forwardIteratorConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_inputIteratorConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, i, j, ticks)))))
 
template<class Vector >
void test_inputIteratorConstruction2 (std::false_type)
 
template<class Vector >
void test_inputIteratorConstruction2 (std::true_type)
 
template<class Vector >
void test_inputIteratorConstruction3 ()
 
template<class Vector >
bool test_I_inputIteratorConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_inputIteratorConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_inputIteratorConstruction3 ()
 
 TEST (FBVector, inputIteratorConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_ilConstruction (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_ilConstruction2 (std::false_type)
 
template<class Vector >
void test_ilConstruction2 (std::true_type)
 
template<class Vector >
void test_ilConstruction3 ()
 
template<class Vector >
bool test_I_ilConstruction2 (std::false_type)
 
template<class Vector >
bool test_I_ilConstruction2 (std::true_type)
 
template<class Vector >
bool test_I_ilConstruction3 ()
 
 TEST (FBVector, ilConstruction)
 
template<class Vector , typename T , typename Allocator >
void test_ilAssignment (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_ilAssignment2 (std::false_type)
 
template<class Vector >
void test_ilAssignment2 (std::true_type)
 
template<class Vector >
void test_ilAssignment3 ()
 
template<class Vector >
bool test_I_ilAssignment2 (std::false_type)
 
template<class Vector >
bool test_I_ilAssignment2 (std::true_type)
 
template<class Vector >
bool test_I_ilAssignment3 ()
 
 TEST (FBVector, ilAssignment)
 
template<class Vector >
void insertNTCheck (const Vector &a, DataState< Vector > &dsa, int idx, int n, int val)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorEmplacement (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, p, ticks)))))
 
template<class Vector >
void test_iteratorEmplacement2 (std::false_type)
 
template<class Vector >
void test_iteratorEmplacement2 (std::true_type)
 
template<class Vector >
void test_iteratorEmplacement3 ()
 
template<class Vector >
bool test_I_iteratorEmplacement2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorEmplacement2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorEmplacement3 ()
 
 TEST (FBVector, iteratorEmplacement)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertion (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, p, t, ticks)))))
 
template<class Vector >
void test_iteratorInsertion2 (std::false_type)
 
template<class Vector >
void test_iteratorInsertion2 (std::true_type)
 
template<class Vector >
void test_iteratorInsertion3 ()
 
template<class Vector >
bool test_I_iteratorInsertion2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorInsertion2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorInsertion3 ()
 
 TEST (FBVector, iteratorInsertion)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionRV (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, p, t, ticks)))))
 
template<class Vector >
void test_iteratorInsertionRV2 (std::false_type)
 
template<class Vector >
void test_iteratorInsertionRV2 (std::true_type)
 
template<class Vector >
void test_iteratorInsertionRV3 ()
 
template<class Vector >
bool test_I_iteratorInsertionRV2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorInsertionRV2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorInsertionRV3 ()
 
 TEST (FBVector, iteratorInsertionRV)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionN (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(6,(z, a, p, n, t, ticks)))))
 
template<class Vector >
void test_iteratorInsertionN2 (std::false_type)
 
template<class Vector >
void test_iteratorInsertionN2 (std::true_type)
 
template<class Vector >
void test_iteratorInsertionN3 ()
 
template<class Vector >
bool test_I_iteratorInsertionN2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorInsertionN2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorInsertionN3 ()
 
 TEST (FBVector, iteratorInsertionN)
 
template<class Vector >
void insertItCheck (const Vector &a, DataState< Vector > &dsa, int idx, int *b, int *e)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionIterator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(6,(z, a, p, i, j, ticks)))))
 
template<class Vector >
void test_iteratorInsertionIterator2 (std::false_type)
 
template<class Vector >
void test_iteratorInsertionIterator2 (std::true_type)
 
template<class Vector >
void test_iteratorInsertionIterator3 ()
 
template<class Vector >
bool test_I_iteratorInsertionIterator2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorInsertionIterator2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorInsertionIterator3 ()
 
 TEST (FBVector, iteratorInsertionIterator)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionInputIterator (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(6,(z, a, p, i, j, ticks)))))
 
template<class Vector >
void test_iteratorInsertionInputIterator2 (std::false_type)
 
template<class Vector >
void test_iteratorInsertionInputIterator2 (std::true_type)
 
template<class Vector >
void test_iteratorInsertionInputIterator3 ()
 
template<class Vector >
bool test_I_iteratorInsertionInputIterator2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorInsertionInputIterator2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorInsertionInputIterator3 ()
 
 TEST (FBVector, iteratorInsertionInputIterator)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertIL (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, p, ticks)))))
 
template<class Vector >
void test_iteratorInsertIL2 (std::false_type)
 
template<class Vector >
void test_iteratorInsertIL2 (std::true_type)
 
template<class Vector >
void test_iteratorInsertIL3 ()
 
template<class Vector >
bool test_I_iteratorInsertIL2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorInsertIL2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorInsertIL3 ()
 
 TEST (FBVector, iteratorInsertIL)
 
template<class Vector >
void eraseCheck (Vector &a, DataState< Vector > &dsa, int idx, int n)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorErase (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, p, ticks)))))
 
template<class Vector >
void test_iteratorErase2 (std::false_type)
 
template<class Vector >
void test_iteratorErase2 (std::true_type)
 
template<class Vector >
void test_iteratorErase3 ()
 
template<class Vector >
bool test_I_iteratorErase2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorErase2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorErase3 ()
 
 TEST (FBVector, iteratorErase)
 
template<class Vector , typename T , typename Allocator >
void test_iteratorEraseRange (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, p, q, ticks)))))
 
template<class Vector >
void test_iteratorEraseRange2 (std::false_type)
 
template<class Vector >
void test_iteratorEraseRange2 (std::true_type)
 
template<class Vector >
void test_iteratorEraseRange3 ()
 
template<class Vector >
bool test_I_iteratorEraseRange2 (std::false_type)
 
template<class Vector >
bool test_I_iteratorEraseRange2 (std::true_type)
 
template<class Vector >
bool test_I_iteratorEraseRange3 ()
 
 TEST (FBVector, iteratorEraseRange)
 
template<class Vector , typename T , typename Allocator >
void test_clear (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_clear2 (std::false_type)
 
template<class Vector >
void test_clear2 (std::true_type)
 
template<class Vector >
void test_clear3 ()
 
template<class Vector >
bool test_I_clear2 (std::false_type)
 
template<class Vector >
bool test_I_clear2 (std::true_type)
 
template<class Vector >
bool test_I_clear3 ()
 
 TEST (FBVector, clear)
 
template<class Vector , typename T , typename Allocator >
void test_assignRange (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, i, j, ticks)))))
 
template<class Vector >
void test_assignRange2 (std::false_type)
 
template<class Vector >
void test_assignRange2 (std::true_type)
 
template<class Vector >
void test_assignRange3 ()
 
template<class Vector >
bool test_I_assignRange2 (std::false_type)
 
template<class Vector >
bool test_I_assignRange2 (std::true_type)
 
template<class Vector >
bool test_I_assignRange3 ()
 
 TEST (FBVector, assignRange)
 
template<class Vector , typename T , typename Allocator >
void test_assignInputRange (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, i, j, ticks)))))
 
template<class Vector >
void test_assignInputRange2 (std::false_type)
 
template<class Vector >
void test_assignInputRange2 (std::true_type)
 
template<class Vector >
void test_assignInputRange3 ()
 
template<class Vector >
bool test_I_assignInputRange2 (std::false_type)
 
template<class Vector >
bool test_I_assignInputRange2 (std::true_type)
 
template<class Vector >
bool test_I_assignInputRange3 ()
 
 TEST (FBVector, assignInputRange)
 
template<class Vector , typename T , typename Allocator >
void test_assignIL (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_assignIL2 (std::false_type)
 
template<class Vector >
void test_assignIL2 (std::true_type)
 
template<class Vector >
void test_assignIL3 ()
 
template<class Vector >
bool test_I_assignIL2 (std::false_type)
 
template<class Vector >
bool test_I_assignIL2 (std::true_type)
 
template<class Vector >
bool test_I_assignIL3 ()
 
 TEST (FBVector, assignIL)
 
template<class Vector , typename T , typename Allocator >
void test_assignN (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, n, t, ticks)))))
 
template<class Vector >
void test_assignN2 (std::false_type)
 
template<class Vector >
void test_assignN2 (std::true_type)
 
template<class Vector >
void test_assignN3 ()
 
template<class Vector >
bool test_I_assignN2 (std::false_type)
 
template<class Vector >
bool test_I_assignN2 (std::true_type)
 
template<class Vector >
bool test_I_assignN3 ()
 
 TEST (FBVector, assignN)
 
template<class Vector , typename T , typename Allocator >
void test_front (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_front2 (std::false_type)
 
template<class Vector >
void test_front2 (std::true_type)
 
template<class Vector >
void test_front3 ()
 
template<class Vector >
bool test_I_front2 (std::false_type)
 
template<class Vector >
bool test_I_front2 (std::true_type)
 
template<class Vector >
bool test_I_front3 ()
 
 TEST (FBVector, front)
 
template<class Vector , typename T , typename Allocator >
void test_back (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_back2 (std::false_type)
 
template<class Vector >
void test_back2 (std::true_type)
 
template<class Vector >
void test_back3 ()
 
template<class Vector >
bool test_I_back2 (std::false_type)
 
template<class Vector >
bool test_I_back2 (std::true_type)
 
template<class Vector >
bool test_I_back3 ()
 
 TEST (FBVector, back)
 
template<class Vector , typename T , typename Allocator >
void test_emplaceBack (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_emplaceBack2 (std::false_type)
 
template<class Vector >
void test_emplaceBack2 (std::true_type)
 
template<class Vector >
void test_emplaceBack3 ()
 
template<class Vector >
bool test_I_emplaceBack2 (std::false_type)
 
template<class Vector >
bool test_I_emplaceBack2 (std::true_type)
 
template<class Vector >
bool test_I_emplaceBack3 ()
 
 TEST (FBVector, emplaceBack)
 
template<class Vector , typename T , typename Allocator >
void test_pushBack (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, t, ticks)))))
 
template<class Vector >
void test_pushBack2 (std::false_type)
 
template<class Vector >
void test_pushBack2 (std::true_type)
 
template<class Vector >
void test_pushBack3 ()
 
template<class Vector >
bool test_I_pushBack2 (std::false_type)
 
template<class Vector >
bool test_I_pushBack2 (std::true_type)
 
template<class Vector >
bool test_I_pushBack3 ()
 
 TEST (FBVector, pushBack)
 
template<class Vector , typename T , typename Allocator >
void test_pushBackRV (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, t, ticks)))))
 
template<class Vector >
void test_pushBackRV2 (std::false_type)
 
template<class Vector >
void test_pushBackRV2 (std::true_type)
 
template<class Vector >
void test_pushBackRV3 ()
 
template<class Vector >
bool test_I_pushBackRV2 (std::false_type)
 
template<class Vector >
bool test_I_pushBackRV2 (std::true_type)
 
template<class Vector >
bool test_I_pushBackRV3 ()
 
 TEST (FBVector, pushBackRV)
 
template<class Vector , typename T , typename Allocator >
void test_popBack (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_popBack2 (std::false_type)
 
template<class Vector >
void test_popBack2 (std::true_type)
 
template<class Vector >
void test_popBack3 ()
 
template<class Vector >
bool test_I_popBack2 (std::false_type)
 
template<class Vector >
bool test_I_popBack2 (std::true_type)
 
template<class Vector >
bool test_I_popBack3 ()
 
 TEST (FBVector, popBack)
 
template<class Vector , typename T , typename Allocator >
void test_operatorBrace (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_operatorBrace2 (std::false_type)
 
template<class Vector >
void test_operatorBrace2 (std::true_type)
 
template<class Vector >
void test_operatorBrace3 ()
 
template<class Vector >
bool test_I_operatorBrace2 (std::false_type)
 
template<class Vector >
bool test_I_operatorBrace2 (std::true_type)
 
template<class Vector >
bool test_I_operatorBrace3 ()
 
 TEST (FBVector, operatorBrace)
 
template<class Vector , typename T , typename Allocator >
void test_at (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_at2 (std::false_type)
 
template<class Vector >
void test_at2 (std::true_type)
 
template<class Vector >
void test_at3 ()
 
template<class Vector >
bool test_I_at2 (std::false_type)
 
template<class Vector >
bool test_I_at2 (std::true_type)
 
template<class Vector >
bool test_I_at3 ()
 
 TEST (FBVector, at)
 
template<class Vector , typename T , typename Allocator >
void test_moveIterators (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_moveIterators2 (std::false_type)
 
template<class Vector >
void test_moveIterators2 (std::true_type)
 
template<class Vector >
void test_moveIterators3 ()
 
template<class Vector >
bool test_I_moveIterators2 (std::false_type)
 
template<class Vector >
bool test_I_moveIterators2 (std::true_type)
 
template<class Vector >
bool test_I_moveIterators3 ()
 
 TEST (FBVector, moveIterators)
 
template<class Vector , typename T , typename Allocator >
void test_dataAndCapacity (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_dataAndCapacity2 (std::false_type)
 
template<class Vector >
void test_dataAndCapacity2 (std::true_type)
 
template<class Vector >
void test_dataAndCapacity3 ()
 
template<class Vector >
bool test_I_dataAndCapacity2 (std::false_type)
 
template<class Vector >
bool test_I_dataAndCapacity2 (std::true_type)
 
template<class Vector >
bool test_I_dataAndCapacity3 ()
 
 TEST (FBVector, dataAndCapacity)
 
template<class Vector , typename T , typename Allocator >
void test_reserve (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, n, ticks)))))
 
template<class Vector >
void test_reserve2 (std::false_type)
 
template<class Vector >
void test_reserve2 (std::true_type)
 
template<class Vector >
void test_reserve3 ()
 
template<class Vector >
bool test_I_reserve2 (std::false_type)
 
template<class Vector >
bool test_I_reserve2 (std::true_type)
 
template<class Vector >
bool test_I_reserve3 ()
 
 TEST (FBVector, reserve)
 
template<class Vector , typename T , typename Allocator >
void test_lengthError (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_lengthError2 (std::false_type)
 
template<class Vector >
void test_lengthError2 (std::true_type)
 
template<class Vector >
void test_lengthError3 ()
 
template<class Vector >
bool test_I_lengthError2 (std::false_type)
 
template<class Vector >
bool test_I_lengthError2 (std::true_type)
 
template<class Vector >
bool test_I_lengthError3 ()
 
 TEST (FBVector, lengthError)
 
template<class Vector , typename T , typename Allocator >
void test_resize (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, n, ticks)))))
 
template<class Vector >
void test_resize2 (std::false_type)
 
template<class Vector >
void test_resize2 (std::true_type)
 
template<class Vector >
void test_resize3 ()
 
template<class Vector >
bool test_I_resize2 (std::false_type)
 
template<class Vector >
bool test_I_resize2 (std::true_type)
 
template<class Vector >
bool test_I_resize3 ()
 
 TEST (FBVector, resize)
 
template<class Vector , typename T , typename Allocator >
void test_resizeT (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, n, t, ticks)))))
 
template<class Vector >
void test_resizeT2 (std::false_type)
 
template<class Vector >
void test_resizeT2 (std::true_type)
 
template<class Vector >
void test_resizeT3 ()
 
template<class Vector >
bool test_I_resizeT2 (std::false_type)
 
template<class Vector >
bool test_I_resizeT2 (std::true_type)
 
template<class Vector >
bool test_I_resizeT3 ()
 
 TEST (FBVector, resizeT)
 
template<class Vector , typename T , typename Allocator >
void test_shrinkToFit (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_shrinkToFit2 (std::false_type)
 
template<class Vector >
void test_shrinkToFit2 (std::true_type)
 
template<class Vector >
void test_shrinkToFit3 ()
 
template<class Vector >
bool test_I_shrinkToFit2 (std::false_type)
 
template<class Vector >
bool test_I_shrinkToFit2 (std::true_type)
 
template<class Vector >
bool test_I_shrinkToFit3 ()
 
 TEST (FBVector, shrinkToFit)
 
template<class Vector , typename T , typename Allocator >
void test_ebo (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks)))))
 
template<class Vector >
void test_ebo2 (std::false_type)
 
template<class Vector >
void test_ebo2 (std::true_type)
 
template<class Vector >
void test_ebo3 ()
 
template<class Vector >
bool test_I_ebo2 (std::false_type)
 
template<class Vector >
bool test_I_ebo2 (std::true_type)
 
template<class Vector >
bool test_I_ebo3 ()
 
 TEST (FBVector, ebo)
 
template<class Vector , typename T , typename Allocator >
void test_relinquish (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_relinquish2 (std::false_type)
 
template<class Vector >
void test_relinquish2 (std::true_type)
 
template<class Vector >
void test_relinquish3 ()
 
template<class Vector >
bool test_I_relinquish2 (std::false_type)
 
template<class Vector >
bool test_I_relinquish2 (std::true_type)
 
template<class Vector >
bool test_I_relinquish3 ()
 
 TEST (FBVector, relinquish)
 
template<class Vector , typename T , typename Allocator >
void test_attach (BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks)))))
 
template<class Vector >
void test_attach2 (std::false_type)
 
template<class Vector >
void test_attach2 (std::true_type)
 
template<class Vector >
void test_attach3 ()
 
template<class Vector >
bool test_I_attach2 (std::false_type)
 
template<class Vector >
bool test_I_attach2 (std::true_type)
 
template<class Vector >
bool test_I_attach3 ()
 
 TEST (FBVector, attach)
 
int main (int argc, char **argv)
 

Variables

static const vector< pair< int, int > > VectorSizes
 
int populateIndex = 1426
 
static const vector< int > nSizes = {0, 1, 2, 9, 10, 11}
 
static int ijarr [12] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89}
 
static int ijarC [12] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89}
 
static const vector< int > tVals = {0, 1, 2, 3, 17, 66, 521}
 

Macro Definition Documentation

#define ARGIFY (   r,
  d,
  name 
)    TYPIFY(r, d, name) name

Definition at line 906 of file StlVectorTest.cpp.

#define CLOSER_a   }

Definition at line 1277 of file StlVectorTest.cpp.

#define CLOSER_b   }

Definition at line 1302 of file StlVectorTest.cpp.

#define CLOSER_i

Definition at line 1329 of file StlVectorTest.cpp.

#define CLOSER_j   }

Definition at line 1340 of file StlVectorTest.cpp.

#define CLOSER_m   }

Definition at line 1439 of file StlVectorTest.cpp.

#define CLOSER_n   }

Definition at line 1315 of file StlVectorTest.cpp.

#define CLOSER_p   }

Definition at line 1393 of file StlVectorTest.cpp.

#define CLOSER_q   }

Definition at line 1403 of file StlVectorTest.cpp.

#define CLOSER_t   }

Definition at line 1426 of file StlVectorTest.cpp.

#define CLOSER_ticks   }

Definition at line 1197 of file StlVectorTest.cpp.

#define CLOSER_z

Definition at line 1151 of file StlVectorTest.cpp.

#define DECL (   name,
  ... 
)
Value:
template <class Vector, typename T, typename Allocator> \
void test_##name(BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM( \
const char * name
Definition: http_parser.c:437
#define IBOOST_PP_VARIADIC_TO_SEQ(...)
#define ARGIFY(r, d, name)
const internal::AnythingMatcher _

Definition at line 964 of file StlVectorTest.cpp.

#define GEN_CLOSER (   r,
  d,
  arg 
)    BOOST_PP_CAT(CLOSER_, arg)

Definition at line 903 of file StlVectorTest.cpp.

#define GEN_LOOPER (   r,
  d,
  arg 
)    BOOST_PP_CAT(LOOPER_, arg)

Definition at line 895 of file StlVectorTest.cpp.

#define GEN_RUNNABLE_TEST (   r,
  name,
  type 
)    one = test_I_##name##3 < type > () || one;

Definition at line 892 of file StlVectorTest.cpp.

#define GEN_TEST (   r,
  name,
  type 
)
Value:
{ \
SCOPED_TRACE("allocator: " + atype); \
{ \
SCOPED_TRACE("datatype: " + ptype); \
{ \
test_##name##3 < type > (); \
} \
} \
}
static bool HasFatalFailure()
Definition: gtest.cc:2487
PskType type
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
const char * name
Definition: http_parser.c:437
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1
const char * string
Definition: Conv.cpp:212

Definition at line 875 of file StlVectorTest.cpp.

#define GEN_TYPE_TEST (   r,
  name,
  type 
)
Value:
if (0) \
test_I_##name##3 < type > ();
PskType type
const char * name
Definition: http_parser.c:437

Definition at line 889 of file StlVectorTest.cpp.

#define GEN_UMAKER (   r,
  d,
  arg 
)
Value:
} \
BOOST_PP_CAT(UMAKER_, arg) \
}

Definition at line 899 of file StlVectorTest.cpp.

#define GEN_VMAKER (   r,
  d,
  arg 
)
Value:
{ \
BOOST_PP_CAT(VMAKER_, arg) {

Definition at line 896 of file StlVectorTest.cpp.

#define IBOOST_PP_VARIADIC_SIZE (   ...)
Value:
64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, \
45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, \
26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, \
7, 6, 5, 4, 3, 2, 1,)
#define IBOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9,e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24,e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39,e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54,e55, e56, e57, e58, e59, e60, e61, e62, e63, size,...)

Definition at line 858 of file StlVectorTest.cpp.

#define IBOOST_PP_VARIADIC_SIZE_I (   e0,
  e1,
  e2,
  e3,
  e4,
  e5,
  e6,
  e7,
  e8,
  e9,
  e10,
  e11,
  e12,
  e13,
  e14,
  e15,
  e16,
  e17,
  e18,
  e19,
  e20,
  e21,
  e22,
  e23,
  e24,
  e25,
  e26,
  e27,
  e28,
  e29,
  e30,
  e31,
  e32,
  e33,
  e34,
  e35,
  e36,
  e37,
  e38,
  e39,
  e40,
  e41,
  e42,
  e43,
  e44,
  e45,
  e46,
  e47,
  e48,
  e49,
  e50,
  e51,
  e52,
  e53,
  e54,
  e55,
  e56,
  e57,
  e58,
  e59,
  e60,
  e61,
  e62,
  e63,
  size,
  ... 
)    size

Definition at line 863 of file StlVectorTest.cpp.

#define IBOOST_PP_VARIADIC_TO_SEQ (   ...)    BOOST_PP_TUPLE_TO_SEQ(IBOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__))

Definition at line 869 of file StlVectorTest.cpp.

#define INTERFACE_TYPES
Value:
(_TVI)(VECTOR_<DD1>)(VECTOR_<DD2>)(VECTOR_<DD3>) \
(VECTOR_<DD4>)(VECTOR_<DD5>)(VECTOR_<DD6>) \
(VECTOR_<DD7>)(_TSpecialMA)
folly::fbvector< DDSMA, Alloc< DDSMA > > _TSpecialMA
folly::fbvector< int, Alloc< int > > _TVI

Definition at line 1024 of file StlVectorTest.cpp.

#define LOOPER_a   for (const auto& a_ss : VectorSizes) {

Definition at line 1266 of file StlVectorTest.cpp.

#define LOOPER_b   for (int b_i = -2; b_i < (int)VectorSizes.size(); ++b_i) {

Definition at line 1280 of file StlVectorTest.cpp.

#define LOOPER_i

Definition at line 1324 of file StlVectorTest.cpp.

#define LOOPER_j   for (int j_i = 0; j_i < 12; ++j_i) {

Definition at line 1332 of file StlVectorTest.cpp.

#define LOOPER_m
Value:
int m_max = 1 + (a_p != nullptr); \
for (int m_i = 0; m_i < m_max; ++m_i) {

Definition at line 1432 of file StlVectorTest.cpp.

#define LOOPER_n   for (int n : nSizes) {

Definition at line 1310 of file StlVectorTest.cpp.

#define LOOPER_p   for (int p_i = 0; p_i < 4; ++p_i) {

Definition at line 1386 of file StlVectorTest.cpp.

#define LOOPER_q   for (int q_i = p_i; q_i < 4; ++q_i) {

Definition at line 1396 of file StlVectorTest.cpp.

#define LOOPER_t   for (int t_v : tVals) {

Definition at line 1411 of file StlVectorTest.cpp.

#define LOOPER_ticks
Value:
int _maxTicks_ = 0; \
bool ticks_thrown = false; \
for (int ticks = -1; ticks < _maxTicks_; ++ticks) {

Definition at line 1167 of file StlVectorTest.cpp.

#define LOOPER_z
Value:
Vector* a_p = nullptr; \
Vector* b_p = nullptr; \
typename Vector::value_type* t_p = nullptr;

Definition at line 1141 of file StlVectorTest.cpp.

#define MAKE_TEST (   ref,
  name,
  types,
  restriction,
  argseq,
  ... 
)

Definition at line 909 of file StlVectorTest.cpp.

#define SETUP   hardReset();

Definition at line 1131 of file StlVectorTest.cpp.

#define STL_TEST_I (   ref,
  name,
  restriction,
  ... 
)
Value:
DECL(name, __VA_ARGS__); \
ref, \
name, \
restriction, \
IBOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__), \
__VA_ARGS__) \
DECL(name, __VA_ARGS__)
#define MAKE_TEST(ref, name, types, restriction, argseq,...)
const char * name
Definition: http_parser.c:437
#define IBOOST_PP_VARIADIC_TO_SEQ(...)
#define TEST_TYPES
#define DECL(name,...)

Definition at line 969 of file StlVectorTest.cpp.

#define TEARDOWN

Definition at line 1132 of file StlVectorTest.cpp.

#define TEST_TYPES   (_TVIS)(_TVI)(_TV1)(_TV2)(_TV3)(_TV4)(_TV5v1)(_TV5)(_TP1)(_TP2)(_TP3)

Definition at line 1009 of file StlVectorTest.cpp.

#define TYPIFY (   r,
  d,
  name 
)    BOOST_PP_CAT(TYPIFY_, name)

Definition at line 905 of file StlVectorTest.cpp.

#define TYPIFY_a   Vector&

Definition at line 1265 of file StlVectorTest.cpp.

#define TYPIFY_b   Vector&

Definition at line 1279 of file StlVectorTest.cpp.

#define TYPIFY_i   int*

Definition at line 1323 of file StlVectorTest.cpp.

#define TYPIFY_j   int*

Definition at line 1331 of file StlVectorTest.cpp.

#define TYPIFY_m   typename Vector::allocator_type

Definition at line 1431 of file StlVectorTest.cpp.

#define TYPIFY_n   int

Definition at line 1309 of file StlVectorTest.cpp.

#define TYPIFY_p   typename Vector::iterator

Definition at line 1385 of file StlVectorTest.cpp.

#define TYPIFY_q   typename Vector::iterator

Definition at line 1395 of file StlVectorTest.cpp.

#define TYPIFY_t   typename Vector::value_type&

Definition at line 1410 of file StlVectorTest.cpp.

#define TYPIFY_ticks   int

Definition at line 1166 of file StlVectorTest.cpp.

#define TYPIFY_z   std::nullptr_t

Definition at line 1140 of file StlVectorTest.cpp.

#define UMAKER_a
Value:
verify(0, a); \
static bool HasFatalFailure()
Definition: gtest.cc:2487
void verify(int extras)
char a
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1

Definition at line 1273 of file StlVectorTest.cpp.

#define UMAKER_b
Value:
verify(0, a, b); \
static bool HasFatalFailure()
Definition: gtest.cc:2487
void verify(int extras)
char b
char a
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1

Definition at line 1298 of file StlVectorTest.cpp.

#define UMAKER_i

Definition at line 1328 of file StlVectorTest.cpp.

#define UMAKER_j
Value:
for (int j_c = 0; j_c < 12; ++j_c) \
ASSERT_EQ(ijarC[j_c], ijarr[j_c]);
static int ijarC[12]
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int ijarr[12]

Definition at line 1337 of file StlVectorTest.cpp.

#define UMAKER_m

Definition at line 1438 of file StlVectorTest.cpp.

#define UMAKER_n

Definition at line 1314 of file StlVectorTest.cpp.

#define UMAKER_p

Definition at line 1392 of file StlVectorTest.cpp.

#define UMAKER_q

Definition at line 1402 of file StlVectorTest.cpp.

#define UMAKER_t

Definition at line 1425 of file StlVectorTest.cpp.

#define UMAKER_ticks
Value:
_maxTicks_ = Ticker::CountTicks; \
} \
catch (const TickException&) { \
ticks_thrown = true; \
} \
catch (const std::exception& e) { \
FAIL() << "EXCEPTION: " << e.what(); \
} \
catch (...) { \
FAIL() << "UNKNOWN EXCEPTION"; \
} \
if (ticks >= 0 && Ticker::CountTicks > ticks && !ticks_thrown) \
FAIL() << "CountTicks = " << Ticker::CountTicks << " > " << ticks \
<< " = ticks" \
<< ", but no tick error was observed"; \
#define FAIL()
Definition: gtest.h:1822
static int CountTicks
#define VERIFICATION
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1

Definition at line 1180 of file StlVectorTest.cpp.

#define UMAKER_z
Value:
verify<Vector>(0); \
}
static bool HasFatalFailure()
Definition: gtest.cc:2487
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1

Definition at line 1146 of file StlVectorTest.cpp.

#define VECTOR_   folly::fbvector

Definition at line 166 of file StlVectorTest.cpp.

#define VERIFICATION
Value:
if (b_p != nullptr) \
verify(t_p != nullptr, *a_p, *b_p); \
else if (a_p != nullptr) \
verify(t_p != nullptr, *a_p); \
else \
verify<Vector>(t_p != nullptr); \
static bool HasFatalFailure()
Definition: gtest.cc:2487
void verify(int extras)
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1

Definition at line 1156 of file StlVectorTest.cpp.

#define VMAKER_a
Value:
a_p = &a; \
populate(*a_p, a_ss); \
string a_st = folly::to<string>("a (", a.size(), "/", a.capacity(), ")"); \
void populate(Vector &v, const pair< int, int > &ss)
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
char a
const char * string
Definition: Conv.cpp:212

Definition at line 1267 of file StlVectorTest.cpp.

#define VMAKER_b
Value:
b_p = &b_s; \
string b_st; \
if (b_i == -2) { \
b_p = &a; \
b_st = "b is an alias of a"; \
} else if (b_i == -1) { \
b_s.~Vector(); \
new (&b_s) Vector(a); \
b_st = "b is a deep copy of a"; \
} else { \
populate(b_s, VectorSizes[b_i]); \
b_st = folly::to<string>("b (", b_s.size(), "/", b_s.capacity(), ")"); \
} \
Vector& b = *b_p; \
void populate(Vector &v, const pair< int, int > &ss)
char b
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
static const vector< pair< int, int > > VectorSizes
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
char a
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1
const char * string
Definition: Conv.cpp:212

Definition at line 1281 of file StlVectorTest.cpp.

#define VMAKER_i
Value:
int* i = ijarr; \
SCOPED_TRACE("i = fib[0]");
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
static int ijarr[12]

Definition at line 1325 of file StlVectorTest.cpp.

#define VMAKER_j
Value:
int* j = ijarr + j_i; \
string j_st = folly::to<string>("j = fib[", j_i, "]"); \
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
static int ijarr[12]
const char * string
Definition: Conv.cpp:212

Definition at line 1333 of file StlVectorTest.cpp.

#define VMAKER_m
Value:
typename Vector::allocator_type m = \
m_i == 0 ? typename Vector::allocator_type() : a_p->get_allocator();
static map< string, int > m

Definition at line 1435 of file StlVectorTest.cpp.

#define VMAKER_n
Value:
string n_st = folly::to<string>("n = ", n); \
#define SCOPED_TRACE(message)
Definition: gtest.h:2115

Definition at line 1311 of file StlVectorTest.cpp.

#define VMAKER_p
Value:
auto p_im = iterSpotter(a, p_i); \
auto& p = p_im.first; \
auto& p_m = p_im.second; \
SCOPED_TRACE("p = " + p_m);
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
char a
std::pair< typename Vector::iterator, string > iterSpotter(Vector &v, int i)

Definition at line 1387 of file StlVectorTest.cpp.

#define VMAKER_q
Value:
auto q_im = iterSpotter(a, q_i); \
auto& q = q_im.first; \
auto& q_m = q_im.second; \
SCOPED_TRACE("q = " + q_m);
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
char a
std::pair< typename Vector::iterator, string > iterSpotter(Vector &v, int i)

Definition at line 1397 of file StlVectorTest.cpp.

#define VMAKER_t
Value:
typename Vector::value_type t_s(t_v); \
t_p = addressof(t_s); \
string t_st = folly::to<string>("t(", t_v, ")"); \
if (t_v < 4 && a_p != nullptr) { \
auto t_im = iterSpotter(*a_p, t_v); \
if (t_im.first != a_p->end()) { \
t_p = addressof(*t_im.first); \
t_st = "t is " + t_im.second; \
} \
} \
typename Vector::value_type& t = *t_p; \
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1
const char * string
Definition: Conv.cpp:212
std::pair< typename Vector::iterator, string > iterSpotter(Vector &v, int i)

Definition at line 1412 of file StlVectorTest.cpp.

#define VMAKER_ticks
Value:
string ticks_st = folly::to<string>("ticks = ", ticks); \
SCOPED_TRACE(ticks_st); \
{ \
SCOPED_TRACE("pre-run verification"); \
} \
try { \
softReset(ticks);
void softReset(int ticks=-1)
#define SCOPED_TRACE(message)
Definition: gtest.h:2115
#define VERIFICATION

Definition at line 1171 of file StlVectorTest.cpp.

#define VMAKER_z   std::nullptr_t z = nullptr;

Definition at line 1145 of file StlVectorTest.cpp.

Typedef Documentation

Definition at line 1005 of file StlVectorTest.cpp.

Definition at line 1006 of file StlVectorTest.cpp.

Definition at line 1007 of file StlVectorTest.cpp.

Definition at line 1021 of file StlVectorTest.cpp.

typedef folly::fbvector<ED1, std::allocator<ED1> > _TV1

Definition at line 994 of file StlVectorTest.cpp.

typedef folly::fbvector<ED2, std::allocator<ED2> > _TV2

Definition at line 995 of file StlVectorTest.cpp.

typedef folly::fbvector<ED3, std::allocator<ED3> > _TV3

Definition at line 996 of file StlVectorTest.cpp.

typedef folly::fbvector<ED4, std::allocator<ED4> > _TV4

Definition at line 997 of file StlVectorTest.cpp.

Definition at line 999 of file StlVectorTest.cpp.

typedef folly::fbvector<ED5, std::allocator<ED5> > _TV5v1

Definition at line 998 of file StlVectorTest.cpp.

typedef folly::fbvector<int, Alloc<int> > _TVI

Definition at line 993 of file StlVectorTest.cpp.

typedef folly::fbvector<int, std::allocator<int> > _TVIS

Definition at line 992 of file StlVectorTest.cpp.

typedef Data<ALL_DELETE> DD1

Definition at line 1012 of file StlVectorTest.cpp.

Definition at line 1013 of file StlVectorTest.cpp.

Definition at line 1014 of file StlVectorTest.cpp.

Definition at line 1015 of file StlVectorTest.cpp.

Definition at line 1016 of file StlVectorTest.cpp.

typedef Data<CC_DELETE> DD6

Definition at line 1017 of file StlVectorTest.cpp.

typedef Data<CA_DELETE> DD7

Definition at line 1018 of file StlVectorTest.cpp.

Definition at line 1020 of file StlVectorTest.cpp.

typedef Data ED1

Definition at line 986 of file StlVectorTest.cpp.

typedef Data<0, 4080> ED2

Definition at line 987 of file StlVectorTest.cpp.

typedef Data<MC_NOEXCEPT> ED3

Definition at line 988 of file StlVectorTest.cpp.

Definition at line 989 of file StlVectorTest.cpp.

Definition at line 990 of file StlVectorTest.cpp.

typedef Data<PROP_COPY> EP1

Definition at line 1001 of file StlVectorTest.cpp.

typedef Data<PROP_MOVE> EP2

Definition at line 1002 of file StlVectorTest.cpp.

typedef Data<PROP_SWAP> EP3

Definition at line 1003 of file StlVectorTest.cpp.

typedef uint32_t Flags

Definition at line 211 of file StlVectorTest.cpp.

Enumeration Type Documentation

enum FlagVals : Flags
Enumerator
DC_NOEXCEPT 
DC_THROW 
DC_DELETE 
CC_NOEXCEPT 
CC_THROW 
CC_DELETE 
MC_NOEXCEPT 
MC_THROW 
MC_DELETE 
OC_NOEXCEPT 
OC_THROW 
CA_NOEXCEPT 
CA_THROW 
CA_DELETE 
MA_NOEXCEPT 
MA_THROW 
MA_DELETE 
ALL_DELETE 
IS_RELOCATABLE 
PROP_COPY 
PROP_MOVE 
PROP_SWAP 

Definition at line 223 of file StlVectorTest.cpp.

223  : Flags {
224  DC_NOEXCEPT = 0x1,
225  DC_THROW = 0x2,
226  DC_DELETE = 0x8000,
227  CC_NOEXCEPT = 0x4,
228  CC_THROW = 0x8,
229  CC_DELETE = 0x10000,
230  MC_NOEXCEPT = 0x10,
231  MC_THROW = 0x20,
232  MC_DELETE = 0x20000,
233  OC_NOEXCEPT = 0x40,
234  OC_THROW = 0x80,
235  // OC_DELETE - DNE
236 
237  CA_NOEXCEPT = 0x100,
238  CA_THROW = 0x200,
239  CA_DELETE = 0x40000,
240  MA_NOEXCEPT = 0x400,
241  MA_THROW = 0x800,
242  MA_DELETE = 0x80000,
243 
245 
246  IS_RELOCATABLE = 0x2000,
247 
248  // for the allocator
249  PROP_COPY = 0x100000,
250  PROP_MOVE = 0x200000,
251  PROP_SWAP = 0x400000,
252 };
uint32_t Flags

Function Documentation

template<Flags f, size_t pad>
int convertToInt ( const Data< f, pad > &  t)

Definition at line 1532 of file StlVectorTest.cpp.

1532  {
1533  return t.uid;
1534 }
template<typename T >
int convertToInt ( const std::allocator< T > &  )

Definition at line 1536 of file StlVectorTest.cpp.

1536  {
1537  return -1;
1538 }
template<typename T >
int convertToInt ( const Alloc< T > &  a)

Definition at line 1540 of file StlVectorTest.cpp.

References Alloc< T >::id.

1540  {
1541  return a.id;
1542 }
template<class Vector >
void eraseCheck ( Vector &  a,
DataState< Vector > &  dsa,
int  idx,
int  n 
)

Definition at line 2563 of file StlVectorTest.cpp.

References ASSERT_EQ, convertToInt(), i, and DataState< Vector >::size().

Referenced by test_iteratorErase3(), and test_iteratorEraseRange3().

2563  {
2564  ASSERT_EQ(dsa.size() - n, a.size());
2565  int i = 0;
2566  auto it = a.begin();
2567  for (; it != a.end(); ++it, ++i) {
2568  if (i == idx) {
2569  i += n;
2570  }
2571  ASSERT_EQ(dsa[i], convertToInt(*it));
2572  }
2573 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
size_type size()
char a
int convertToInt(int t)
int getTotal ( )

Definition at line 768 of file StlVectorTest.cpp.

References Counter::CountCC, Counter::CountDC, Counter::CountDestroy, Counter::CountLoggedConstruction, Counter::CountMC, and Counter::CountOC.

Referenced by isSane(), and verify().

768  {
771  int del = Counter::CountDestroy;
772  return con - del;
773 }
static int CountDestroy
static int CountMC
static int CountCC
static int CountOC
static int CountLoggedConstruction
static int CountDC
void hardReset ( )

Definition at line 755 of file StlVectorTest.cpp.

References AllocTracker::Constructed, Counter::CountLoggedConstruction, AllocTracker::Destroyed, softReset(), and Tracker::UIDTotal.

755  {
756  Tracker::UIDCount.clear();
757  Tracker::UIDTotal = 0;
758  Tracker::Locations.clear();
759  softReset();
761 
764  AllocTracker::Allocated.clear();
765  AllocTracker::Owner.clear();
766 }
static map< void *, size_t > Allocated
static std::map< const Tracker *, int > Locations
static int UIDTotal
void softReset(int ticks=-1)
static std::map< int, int > UIDCount
static int Destroyed
static map< void *, int > Owner
static int CountLoggedConstruction
static int Constructed
template<class Vector >
void insertItCheck ( const Vector &  a,
DataState< Vector > &  dsa,
int  idx,
int *  b,
int *  e 
)

Definition at line 2451 of file StlVectorTest.cpp.

References a, ASSERT_EQ, b, convertToInt(), i, DataState< Vector >::size(), and STL_TEST.

Referenced by test_iteratorInsertIL3(), test_iteratorInsertionInputIterator3(), and test_iteratorInsertionIterator3().

2456  {
2457  ASSERT_EQ(dsa.size() + (e - b), a.size());
2458  int i = 0;
2459  for (; i < idx; ++i) {
2460  ASSERT_EQ(dsa[i], convertToInt(a.data()[i]));
2461  }
2462  for (; i < idx + (e - b); ++i) {
2463  ASSERT_EQ(*(b + i - idx), convertToInt(a.data()[i]));
2464  }
2465  for (; size_t(i) < a.size(); ++i) {
2466  ASSERT_EQ(dsa[i - (e - b)], convertToInt(a.data()[i]));
2467  }
2468 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char b
size_type size()
char a
int convertToInt(int t)
template<class Vector >
void insertNTCheck ( const Vector &  a,
DataState< Vector > &  dsa,
int  idx,
int  n,
int  val 
)

Definition at line 2342 of file StlVectorTest.cpp.

References a, ASSERT_EQ, convertToInt(), i, DataState< Vector >::size(), and STL_TEST.

Referenced by test_iteratorEmplacement3(), test_iteratorInsertion3(), test_iteratorInsertionN3(), and test_iteratorInsertionRV3().

2347  {
2348  ASSERT_EQ(dsa.size() + n, a.size());
2349  int i = 0;
2350  for (; i < idx; ++i) {
2351  ASSERT_EQ(dsa[i], convertToInt(a.data()[i])) << i;
2352  }
2353  for (; i < idx + n; ++i) {
2354  ASSERT_EQ(val, convertToInt(a.data()[i])) << i;
2355  }
2356  for (; size_t(i) < a.size(); ++i) {
2357  ASSERT_EQ(dsa[i - n], convertToInt(a.data()[i])) << i;
2358  }
2359 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
double val
Definition: String.cpp:273
size_type size()
char a
int convertToInt(int t)
void isSane ( )

Definition at line 775 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_GE, ASSERT_TRUE, folly::empty(), getTotal(), folly::size(), and Tracker::UIDTotal.

Referenced by folly::basic_fbstring< E, T, A, Storage >::replaceImpl(), folly::basic_fbstring< E, T, A, Storage >::replaceImplDiscr(), and verify().

775  {
776  int tot = getTotal();
777  ASSERT_GE(tot, 0) << "more objects deleted than constructed";
778 
780  << "UIDTotal has incorrect number of objects";
781 
782  int altTot = 0;
783  for (const auto& kv : Tracker::UIDCount) {
784  ASSERT_TRUE(kv.second >= 0) << "there exists " << kv.second
785  << " Data "
786  "with uid "
787  << kv.first;
788  altTot += kv.second;
789  }
790  ASSERT_EQ(tot, altTot) << "UIDCount corrupted";
791 
792  if (!Tracker::Locations.empty()) { // implied by IsRelocatable
794  << "Locations has incorrect number of objects";
795  for (const auto& du : Tracker::Locations) {
796  ASSERT_EQ(du.second, du.first->uid) << "Locations contains wrong uid";
797  ASSERT_EQ(du.first, du.first->self) << "Data.self is corrupted";
798  }
799  }
800 }
#define ASSERT_GE(val1, val2)
Definition: gtest.h:1972
static std::map< const Tracker *, int > Locations
static int UIDTotal
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static std::map< int, int > UIDCount
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
constexpr auto empty(C const &c) -> decltype(c.empty())
Definition: Access.h:55
int getTotal()
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
std::pair<typename Vector::iterator, string> iterSpotter ( Vector &  v,
int  i 
)

Definition at line 1346 of file StlVectorTest.cpp.

References FOLLY_FALLTHROUGH.

1346  {
1347  typename Vector::iterator it;
1348  string msg;
1349 
1350  switch (i) {
1351  case 1:
1352  if (!v.empty()) {
1353  it = v.begin();
1354  ++it;
1355  msg = "a[1]";
1356  break;
1357  }
1359  case 0:
1360  it = v.begin();
1361  msg = "a.begin";
1362  break;
1363 
1364  case 2:
1365  if (!v.empty()) {
1366  it = v.end();
1367  --it;
1368  msg = "a[-1]";
1369  break;
1370  }
1372  case 3:
1373  it = v.end();
1374  msg = "a.end";
1375  break;
1376 
1377  default:
1378  cerr << "internal error" << endl;
1379  exit(1);
1380  }
1381 
1382  return make_pair(it, msg);
1383 }
#define FOLLY_FALLTHROUGH
Definition: CppAttributes.h:63
int main ( int  argc,
char **  argv 
)

Definition at line 3070 of file StlVectorTest.cpp.

References FOLLY_POP_WARNING, testing::InitGoogleTest(), and RUN_ALL_TESTS().

3070  {
3071  testing::InitGoogleTest(&argc, argv);
3072  gflags::ParseCommandLineFlags(&argc, &argv, true);
3073 
3074  return RUN_ALL_TESTS();
3075 }
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: gtest.h:2232
char ** argv
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:5370
template<typename It >
Transformer<It, forward_iterator_tag> makeForwardIterator ( const It &  it)
template<typename It >
Transformer<It, input_iterator_tag> makeInputIterator ( const It &  it)
void mutate ( int &  i)

Definition at line 1625 of file StlVectorTest.cpp.

Referenced by test_I_at3(), test_I_back3(), test_I_front3(), and test_operatorBrace3().

1625  {
1626  if ((false)) {
1627  i = 0;
1628  }
1629 }
void mutate ( uint64_t i)

Definition at line 1630 of file StlVectorTest.cpp.

1630  {
1631  if ((false)) {
1632  i = 0;
1633  }
1634 }
template<Flags f, size_t pad>
void mutate ( Data< f, pad > &  ds)

Definition at line 1636 of file StlVectorTest.cpp.

1636  {
1637  if ((false)) {
1638  ds.uid = 0;
1639  }
1640 }
template<class Vector >
void populate ( Vector &  v,
const pair< int, int > &  ss 
)

Definition at line 1238 of file StlVectorTest.cpp.

References i, and populateIndex.

Referenced by TEST().

1238  {
1239  int i = 0;
1240  for (; i < ss.first; ++i) {
1241  v.emplace_back(populateIndex++);
1242  }
1243  if (ss.second >= 0) {
1244  while (v.capacity() - v.size() != size_t(ss.second)) {
1245  v.emplace_back(populateIndex++);
1246  }
1247  }
1248 }
int populateIndex
uint64_t ReadTSC ( )

Definition at line 838 of file StlVectorTest.cpp.

References uint64_t.

838  {
839 #ifdef _MSC_VER
840  return __rdtsc();
841 #else
842  unsigned reslo, reshi;
843 
844  __asm__ __volatile__("xorl %%eax,%%eax \n cpuid \n" ::
845  : "%eax", "%ebx", "%ecx", "%edx");
846  __asm__ __volatile__("rdtsc\n" : "=a"(reslo), "=d"(reshi));
847  __asm__ __volatile__("xorl %%eax,%%eax \n cpuid \n" ::
848  : "%eax", "%ebx", "%ecx", "%edx");
849 
850  return ((uint64_t)reshi << 32) | reslo;
851 #endif
852 }
void softReset ( int  ticks = -1)

Definition at line 745 of file StlVectorTest.cpp.

References Counter::CountCA, Counter::CountCC, Counter::CountDC, Counter::CountDestroy, Counter::CountLoggedConstruction, Counter::CountMA, Counter::CountMC, Counter::CountOC, Ticker::CountTicks, Counter::CountTotalOps, and Ticker::TicksLeft.

Referenced by hardReset().

745  {
750  Counter::CountDestroy = Counter::CountTotalOps = 0;
751  Ticker::CountTicks = 0;
752  Ticker::TicksLeft = ticks;
753 }
static int CountDestroy
static int CountMC
static int CountCC
static int CountCA
static int CountOC
static int TicksLeft
static int CountTotalOps
static int CountTicks
static int CountMA
static int CountLoggedConstruction
static int CountDC
TEST ( FBVector  ,
containerTypedefs   
)

Definition at line 1652 of file StlVectorTest.cpp.

1652 {
TEST ( FBVector  ,
emptyConstruction   
)

Definition at line 1715 of file StlVectorTest.cpp.

1715 {
TEST ( FBVector  ,
populate   
)

Definition at line 1729 of file StlVectorTest.cpp.

1729 {
TEST ( FBVector  ,
copyConstruction   
)

Definition at line 1764 of file StlVectorTest.cpp.

1764 {
TEST ( FBVector  ,
moveConstruction   
)

Definition at line 1785 of file StlVectorTest.cpp.

1785 {
TEST ( FBVector  ,
moveAssignment   
)

Definition at line 1801 of file StlVectorTest.cpp.

1801 {
TEST ( FBVector  ,
destructible   
)

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
TEST ( FBVector  ,
iterators   
)

Definition at line 1823 of file StlVectorTest.cpp.

1823 {
TEST ( FBVector  ,
equitable   
)

Definition at line 1855 of file StlVectorTest.cpp.

1855 {
TEST ( FBVector  ,
memberSwappable   
)

Definition at line 1870 of file StlVectorTest.cpp.

1870 {
TEST ( FBVector  ,
nonmemberSwappable   
)

Definition at line 1903 of file StlVectorTest.cpp.

1903 {
TEST ( FBVector  ,
copyAssign   
)

Definition at line 1941 of file StlVectorTest.cpp.

1941 {
TEST ( FBVector  ,
sizeops   
)

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
TEST ( FBVector  ,
reversibleContainerTypedefs   
)

Definition at line 1978 of file StlVectorTest.cpp.

1978 {
TEST ( FBVector  ,
reversibleIterators   
)

Definition at line 1992 of file StlVectorTest.cpp.

1992 {
TEST ( FBVector  ,
comparable   
)

Definition at line 2027 of file StlVectorTest.cpp.

2027 {
TEST ( FBVector  ,
allocatorTypedefs   
)

Definition at line 2046 of file StlVectorTest.cpp.

2046 {
TEST ( FBVector  ,
getAllocator   
)

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
TEST ( FBVector  ,
defaultAllocator   
)

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
TEST ( FBVector  ,
customAllocator   
)

Definition at line 2060 of file StlVectorTest.cpp.

2060 {
TEST ( FBVector  ,
copyWithAllocator   
)

Definition at line 2072 of file StlVectorTest.cpp.

2072 {
TEST ( FBVector  ,
moveConstructionWithAllocator   
)

Definition at line 2090 of file StlVectorTest.cpp.

2090 {
TEST ( FBVector  ,
moveConstructionWithAllocatorSupplied   
)

Definition at line 2100 of file StlVectorTest.cpp.

2100 {
TEST ( FBVector  ,
allocAssign   
)

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
TEST ( FBVector  ,
nAllocConstruction   
)

Definition at line 2123 of file StlVectorTest.cpp.

2123 {
TEST ( FBVector  ,
nCopyAllocConstruction   
)

Definition at line 2133 of file StlVectorTest.cpp.

2133 {
TEST ( FBVector  ,
forwardIteratorAllocConstruction   
)

Definition at line 2148 of file StlVectorTest.cpp.

2148 {
TEST ( FBVector  ,
inputIteratorAllocConstruction   
)

Definition at line 2166 of file StlVectorTest.cpp.

2166 {
TEST ( FBVector  ,
ilAllocConstruction   
)

Definition at line 2183 of file StlVectorTest.cpp.

2183 {
TEST ( FBVector  ,
dataRaces   
)

Definition at line 2199 of file StlVectorTest.cpp.

2199 {
TEST ( FBVector  ,
nConstruction   
)

Definition at line 2223 of file StlVectorTest.cpp.

2223 {
TEST ( FBVector  ,
nCopyConstruction   
)

Definition at line 2231 of file StlVectorTest.cpp.

2231 {
TEST ( FBVector  ,
forwardIteratorConstruction   
)

Definition at line 2249 of file StlVectorTest.cpp.

2249 {
TEST ( FBVector  ,
inputIteratorConstruction   
)

Definition at line 2274 of file StlVectorTest.cpp.

2274 {
TEST ( FBVector  ,
ilConstruction   
)

Definition at line 2294 of file StlVectorTest.cpp.

2294 {
TEST ( FBVector  ,
ilAssignment   
)

Definition at line 2314 of file StlVectorTest.cpp.

2314 {
TEST ( FBVector  ,
iteratorEmplacement   
)

Definition at line 2366 of file StlVectorTest.cpp.

2366 {
TEST ( FBVector  ,
iteratorInsertion   
)

Definition at line 2384 of file StlVectorTest.cpp.

2384 {
TEST ( FBVector  ,
iteratorInsertionRV   
)

Definition at line 2404 of file StlVectorTest.cpp.

2404 {
TEST ( FBVector  ,
iteratorInsertionN   
)

Definition at line 2429 of file StlVectorTest.cpp.

2429 {
TEST ( FBVector  ,
iteratorInsertionIterator   
)

Definition at line 2477 of file StlVectorTest.cpp.

2477 {
TEST ( FBVector  ,
iteratorInsertionInputIterator   
)

Definition at line 2508 of file StlVectorTest.cpp.

2508 {
TEST ( FBVector  ,
iteratorInsertIL   
)

Definition at line 2532 of file StlVectorTest.cpp.

2532 {
TEST ( FBVector  ,
iteratorErase   
)

Definition at line 2575 of file StlVectorTest.cpp.

2575 {
TEST ( FBVector  ,
iteratorEraseRange   
)

Definition at line 2597 of file StlVectorTest.cpp.

2597 {
TEST ( FBVector  ,
clear   
)

Definition at line 2616 of file StlVectorTest.cpp.

2616 {
TEST ( FBVector  ,
assignRange   
)

Definition at line 2629 of file StlVectorTest.cpp.

2629 {
TEST ( FBVector  ,
assignInputRange   
)

Definition at line 2651 of file StlVectorTest.cpp.

2651 {
TEST ( FBVector  ,
assignIL   
)

Definition at line 2667 of file StlVectorTest.cpp.

2667 {
TEST ( FBVector  ,
assignN   
)

Definition at line 2696 of file StlVectorTest.cpp.

2696 {
TEST ( FBVector  ,
front   
)

Definition at line 2710 of file StlVectorTest.cpp.

2710 {
TEST ( FBVector  ,
back   
)

Definition at line 2726 of file StlVectorTest.cpp.

2726 {
TEST ( FBVector  ,
emplaceBack   
)

Definition at line 2742 of file StlVectorTest.cpp.

2742 {
TEST ( FBVector  ,
pushBack   
)

Definition at line 2768 of file StlVectorTest.cpp.

2768 {
TEST ( FBVector  ,
pushBackRV   
)

Definition at line 2796 of file StlVectorTest.cpp.

2796 {
TEST ( FBVector  ,
popBack   
)

Definition at line 2823 of file StlVectorTest.cpp.

2823 {
TEST ( FBVector  ,
operatorBrace   
)

Definition at line 2842 of file StlVectorTest.cpp.

2842 {
TEST ( FBVector  ,
at   
)

Definition at line 2855 of file StlVectorTest.cpp.

2855 {
TEST ( FBVector  ,
moveIterators   
)

Definition at line 2876 of file StlVectorTest.cpp.

2876 {
TEST ( FBVector  ,
dataAndCapacity   
)

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
TEST ( FBVector  ,
reserve   
)

Definition at line 2906 of file StlVectorTest.cpp.

2906 {
TEST ( FBVector  ,
lengthError   
)

Definition at line 2923 of file StlVectorTest.cpp.

2923 {
TEST ( FBVector  ,
resize   
)

Definition at line 2940 of file StlVectorTest.cpp.

2940 {
TEST ( FBVector  ,
resizeT   
)

Definition at line 2961 of file StlVectorTest.cpp.

2961 {
TEST ( FBVector  ,
shrinkToFit   
)

Definition at line 2993 of file StlVectorTest.cpp.

2993 {
TEST ( FBVector  ,
ebo   
)

Definition at line 3020 of file StlVectorTest.cpp.

3020 {
TEST ( FBVector  ,
relinquish   
)

Definition at line 3027 of file StlVectorTest.cpp.

3027 {
TEST ( FBVector  ,
attach   
)

Definition at line 3053 of file StlVectorTest.cpp.

3053 {
template<class Vector , typename T , typename Allocator >
void test_allocAssign ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2119 of file StlVectorTest.cpp.

2119  {
2120  // there is nothing new to test here
2121 }
template<class Vector >
void test_allocAssign2 ( std::false_type  )

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
template<class Vector >
void test_allocAssign2 ( std::true_type  )

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
template<class Vector >
void test_allocAssign3 ( )

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
template<class Vector , typename T , typename Allocator >
void test_allocatorTypedefs ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2046 of file StlVectorTest.cpp.

2046  {
2047  static_assert(
2049  "Vector and vector's allocator value_type mismatch");
2050 }
static const char *const value
Definition: Conv.cpp:50
template<class Vector >
void test_allocatorTypedefs2 ( std::false_type  )

Definition at line 2046 of file StlVectorTest.cpp.

2046 {
template<class Vector >
void test_allocatorTypedefs2 ( std::true_type  )

Definition at line 2046 of file StlVectorTest.cpp.

2046 {
template<class Vector >
void test_allocatorTypedefs3 ( )

Definition at line 2046 of file StlVectorTest.cpp.

2046 {
template<class Vector , typename T , typename Allocator >
void test_assignIL ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2667 of file StlVectorTest.cpp.

2667  {
2668  // whitebox: ensure that assign(il) is implemented in terms of
2669  // assign(il.begin(), il.end())
2670 
2671  // gcc fail
2672  if (Ticker::TicksLeft >= 0) {
2673  return;
2674  }
2675 
2676  auto am = a.get_allocator();
2677 
2678  a.assign({1, 4, 7});
2679 
2680  ASSERT_TRUE(am == a.get_allocator());
2681  int ila[] = {1, 4, 7};
2682  int* i = ila;
2683 
2684  ASSERT_EQ(3, a.size());
2685  for (auto it = a.begin(); it != a.end(); ++it, ++i) {
2686  ASSERT_EQ(*i, convertToInt(*it));
2687  }
2688 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int TicksLeft
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_assignIL2 ( std::false_type  )

Definition at line 2667 of file StlVectorTest.cpp.

2667 {
template<class Vector >
void test_assignIL2 ( std::true_type  )

Definition at line 2667 of file StlVectorTest.cpp.

2667 {
template<class Vector >
void test_assignIL3 ( )

Definition at line 2667 of file StlVectorTest.cpp.

2667 {
template<class Vector , typename T , typename Allocator >
void test_assignInputRange ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a,i,j, ticks))))  )

Definition at line 2651 of file StlVectorTest.cpp.

2651  {
2652  auto ii = makeInputIterator(i);
2653  auto ij = makeInputIterator(j);
2654  const auto& cii = ii;
2655  const auto& cij = ij;
2656  auto am = a.get_allocator();
2657 
2658  a.assign(cii, cij);
2659 
2660  ASSERT_TRUE(am == a.get_allocator());
2661  ASSERT_EQ(distance(i, j), a.size());
2662  for (auto it = a.begin(); it != a.end(); ++it, ++i) {
2663  ASSERT_EQ(*i, convertToInt(*it));
2664  }
2665 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
Transformer< It, input_iterator_tag > makeInputIterator(const It &it)
template<class Vector >
void test_assignInputRange2 ( std::false_type  )

Definition at line 2651 of file StlVectorTest.cpp.

2651 {
template<class Vector >
void test_assignInputRange2 ( std::true_type  )

Definition at line 2651 of file StlVectorTest.cpp.

2651 {
template<class Vector >
void test_assignInputRange3 ( )

Definition at line 2651 of file StlVectorTest.cpp.

2651 {
template<class Vector , typename T , typename Allocator >
void test_assignN ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a,n,t, ticks))))  )

Definition at line 2696 of file StlVectorTest.cpp.

2696  {
2697  auto am = a.get_allocator();
2698  auto const& ct = t;
2699  auto tval = convertToInt(t);
2700 
2701  a.assign(n, ct);
2702 
2703  ASSERT_TRUE(am == a.get_allocator());
2704  ASSERT_EQ(n, a.size());
2705  for (auto it = a.begin(); it != a.end(); ++it) {
2706  ASSERT_EQ(tval, convertToInt(*it));
2707  }
2708 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_assignN2 ( std::false_type  )

Definition at line 2696 of file StlVectorTest.cpp.

2696 {
template<class Vector >
void test_assignN2 ( std::true_type  )

Definition at line 2696 of file StlVectorTest.cpp.

2696 {
template<class Vector >
void test_assignN3 ( )

Definition at line 2696 of file StlVectorTest.cpp.

2696 {
template<class Vector , typename T , typename Allocator >
void test_assignRange ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, i, j, ticks))))  )

Definition at line 2629 of file StlVectorTest.cpp.

2629  {
2630  auto fi = makeForwardIterator(i);
2631  auto fj = makeForwardIterator(j);
2632  const auto& cfi = fi;
2633  const auto& cfj = fj;
2634  auto am = a.get_allocator();
2635 
2636  a.assign(cfi, cfj);
2637 
2638  ASSERT_TRUE(am == a.get_allocator());
2639  ASSERT_EQ(distance(i, j), a.size());
2640  for (auto it = a.begin(); it != a.end(); ++it, ++i) {
2641  ASSERT_EQ(*i, convertToInt(*it));
2642  }
2643 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
Transformer< It, forward_iterator_tag > makeForwardIterator(const It &it)
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_assignRange2 ( std::false_type  )

Definition at line 2629 of file StlVectorTest.cpp.

2629 {
template<class Vector >
void test_assignRange2 ( std::true_type  )

Definition at line 2629 of file StlVectorTest.cpp.

2629 {
template<class Vector >
void test_assignRange3 ( )

Definition at line 2629 of file StlVectorTest.cpp.

2629 {
template<class Vector , typename T , typename Allocator >
void test_at ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2855 of file StlVectorTest.cpp.

2855  {
2856  const auto& ca = a;
2857  for (size_t i = 0; i < ca.size(); ++i) {
2858  ASSERT_TRUE(addressof(ca.at(i)) == ca.data() + i);
2859  }
2860 
2862 
2863  try {
2864  ca.at(ca.size());
2865  FAIL() << "at(size) should have thrown an error";
2866  } catch (const std::out_of_range& e) {
2867  } catch (...) {
2868  FAIL() << "at(size) threw error other than out_of_range";
2869  }
2870 
2871  if (false) {
2872  mutate(a.at(0));
2873  }
2874 }
#define FAIL()
Definition: gtest.h:1822
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
char a
void mutate(int &i)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_at2 ( std::false_type  )

Definition at line 2855 of file StlVectorTest.cpp.

2855 {
template<class Vector >
void test_at2 ( std::true_type  )

Definition at line 2855 of file StlVectorTest.cpp.

2855 {
template<class Vector >
void test_at3 ( )

Definition at line 2855 of file StlVectorTest.cpp.

2855 {
template<class Vector , typename T , typename Allocator >
void test_attach ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 3053 of file StlVectorTest.cpp.

3053  {
3054  DataState<Vector> dsa(a);
3055 
3056  auto sz = a.size();
3057  auto cap = a.capacity();
3058  auto guts = relinquish(a);
3059 
3060  ASSERT_EQ(a.data(), nullptr);
3061  attach(a, guts, sz, cap);
3062 
3063  ASSERT_TRUE(dsa == a);
3064 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
T * relinquish(fbvector< T, A > &v)
Definition: FBVector.h:1744
char a
void attach(fbvector< T, A > &v, T *data, size_t sz, size_t cap)
Definition: FBVector.h:1751
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_attach2 ( std::false_type  )

Definition at line 3053 of file StlVectorTest.cpp.

3053 {
template<class Vector >
void test_attach2 ( std::true_type  )

Definition at line 3053 of file StlVectorTest.cpp.

3053 {
template<class Vector >
void test_attach3 ( )

Definition at line 3053 of file StlVectorTest.cpp.

3053 {
template<class Vector , typename T , typename Allocator >
void test_back ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2726 of file StlVectorTest.cpp.

2726  {
2727  if (a.empty()) {
2728  return;
2729  }
2730 
2731  ASSERT_TRUE(addressof(a.back()) == a.data() + a.size() - 1);
2732 
2734 
2735  if (false) {
2736  mutate(a.back());
2737  const Vector& ca = a;
2738  ca.back();
2739  }
2740 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
char a
void mutate(int &i)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_back2 ( std::false_type  )

Definition at line 2726 of file StlVectorTest.cpp.

2726 {
template<class Vector >
void test_back2 ( std::true_type  )

Definition at line 2726 of file StlVectorTest.cpp.

2726 {
template<class Vector >
void test_back3 ( )

Definition at line 2726 of file StlVectorTest.cpp.

2726 {
template<class Vector , typename T , typename Allocator >
void test_clear ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2616 of file StlVectorTest.cpp.

2616  {
2617  auto am = a.get_allocator();
2618 
2619  try {
2620  a.clear();
2621  } catch (...) {
2622  FAIL() << "clear must be noexcept";
2623  }
2624 
2625  ASSERT_TRUE(am == a.get_allocator());
2626  ASSERT_TRUE(a.empty());
2627 }
#define FAIL()
Definition: gtest.h:1822
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_clear2 ( std::false_type  )

Definition at line 2616 of file StlVectorTest.cpp.

2616 {
template<class Vector >
void test_clear2 ( std::true_type  )

Definition at line 2616 of file StlVectorTest.cpp.

2616 {
template<class Vector >
void test_clear3 ( )

Definition at line 2616 of file StlVectorTest.cpp.

2616 {
template<class Vector , typename T , typename Allocator >
void test_comparable ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2027 of file StlVectorTest.cpp.

2027  {
2028  const Vector v1 = {1, 2, 3, 4};
2029  const Vector v2 = {1, 2, 3, 4, 5};
2030  const Vector v3 = {1, 2, 2};
2031  const Vector v4 = {1, 2, 2, 4, 5};
2032  const Vector v5 = {};
2033  const Vector v6 = {1, 2, 3, 4};
2034 
2035  ASSERT_TRUE(v1 < v2);
2036  ASSERT_TRUE(v1 > v3);
2037  ASSERT_TRUE(v1 > v4);
2038  ASSERT_TRUE(v1 > v5);
2039  ASSERT_TRUE(v1 <= v6);
2040  ASSERT_TRUE(v1 >= v6);
2041 }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_comparable2 ( std::false_type  )

Definition at line 2027 of file StlVectorTest.cpp.

2027 {
template<class Vector >
void test_comparable2 ( std::true_type  )

Definition at line 2027 of file StlVectorTest.cpp.

2027 {
template<class Vector >
void test_comparable3 ( )

Definition at line 2027 of file StlVectorTest.cpp.

2027 {
template<class Vector , typename T , typename Allocator >
void test_containerTypedefs ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 1652 of file StlVectorTest.cpp.

1652  {
1653  static_assert(
1655  "T != Vector::value_type");
1656  static_assert(
1658  "T& != Vector::reference");
1659  static_assert(
1661  "const T& != Vector::const_reference");
1662  static_assert(
1663  is_convertible<
1664  typename iterator_traits<
1665  typename Vector::iterator>::iterator_category,
1666  forward_iterator_tag>::value,
1667  "Vector::iterator is not a forward iterator");
1668  static_assert(
1669  is_same<
1670  T,
1671  typename iterator_traits<typename Vector::iterator>::value_type>::
1672  value,
1673  "Vector::iterator does not iterate over type T");
1674  static_assert(
1675  is_convertible<
1676  typename iterator_traits<
1677  typename Vector::const_iterator>::iterator_category,
1678  forward_iterator_tag>::value,
1679  "Vector::const_iterator is not a forward iterator");
1680  static_assert(
1681  is_same<
1682  T,
1683  typename iterator_traits<
1684  typename Vector::const_iterator>::value_type>::value,
1685  "Vector::const_iterator does not iterate over type T");
1686  static_assert(
1687  is_convertible<
1688  typename Vector::iterator,
1689  typename Vector::const_iterator>::value,
1690  "Vector::iterator is not convertible to Vector::const_iterator");
1691  static_assert(
1693  "Vector::difference_type is not signed");
1694  static_assert(
1695  is_same<
1696  typename Vector::difference_type,
1697  typename iterator_traits<
1698  typename Vector::iterator>::difference_type>::value,
1699  "Vector::difference_type != Vector::iterator::difference_type");
1700  static_assert(
1701  is_same<
1702  typename Vector::difference_type,
1703  typename iterator_traits<
1704  typename Vector::const_iterator>::difference_type>::value,
1705  "Vector::difference_type != Vector::const_iterator::difference_type");
1706  static_assert(
1708  "Vector::size_type is not unsigned");
1709  static_assert(
1710  sizeof(typename Vector::size_type) >=
1711  sizeof(typename Vector::difference_type),
1712  "Vector::size_type is smaller than Vector::difference_type");
1713 }
#define T(v)
Definition: http_parser.c:233
static const char *const value
Definition: Conv.cpp:50
template<class Vector >
void test_containerTypedefs2 ( std::false_type  )

Definition at line 1652 of file StlVectorTest.cpp.

1652 {
template<class Vector >
void test_containerTypedefs2 ( std::true_type  )

Definition at line 1652 of file StlVectorTest.cpp.

1652 {
template<class Vector >
void test_containerTypedefs3 ( )

Definition at line 1652 of file StlVectorTest.cpp.

1652 {
template<class Vector , typename T , typename Allocator >
void test_copyAssign ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a,b, ticks))))  )

Definition at line 1941 of file StlVectorTest.cpp.

1941  {
1942  // it is possible to make use of just the copy constructor.
1943 
1944 #ifdef USING_STD_VECTOR
1945  if (std::allocator_traits<
1947  convertToInt(a.get_allocator()) != convertToInt(b.get_allocator())) {
1948  // Bug. By the looks of things, in the above case, their bez is being
1949  // cleared and deallocated, but then the garbage pointers are being used.
1950  return;
1951  }
1952 #endif
1953 
1954  const auto& cb = b;
1955  DataState<Vector> dsb(cb);
1956  auto am = a.get_allocator();
1957  auto bm = b.get_allocator();
1958 
1959  Vector& ret = a = cb;
1960 
1961  if (std::allocator_traits<
1963  ASSERT_TRUE(bm == a.get_allocator());
1964  } else {
1965  ASSERT_TRUE(am == a.get_allocator());
1966  }
1967  ASSERT_TRUE(&ret == &a);
1968  ASSERT_TRUE(dsb == a) << "copy-assign not equal to original";
1969 }
char b
char a
static const char *const value
Definition: Conv.cpp:50
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_copyAssign2 ( std::false_type  )

Definition at line 1941 of file StlVectorTest.cpp.

1941 {
template<class Vector >
void test_copyAssign2 ( std::true_type  )

Definition at line 1941 of file StlVectorTest.cpp.

1941 {
template<class Vector >
void test_copyAssign3 ( )

Definition at line 1941 of file StlVectorTest.cpp.

1941 {
template<class Vector , typename T , typename Allocator >
void test_copyConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 1764 of file StlVectorTest.cpp.

1764  {
1765  const auto& ca = a;
1766  DataState<Vector> dsa(ca);
1767  auto am = a.get_allocator();
1768 
1769  Vector u(ca);
1770 
1771  ASSERT_TRUE(
1772  std::allocator_traits<Allocator>::select_on_container_copy_construction(
1773  am) == u.get_allocator());
1774  ASSERT_TRUE(dsa == u);
1775  ASSERT_TRUE(
1776  (ca.data() == nullptr && u.data() == nullptr) || (ca.data() != u.data()))
1777  << "only a shallow copy was made";
1778 
1779  if (false) {
1780  Vector(ca2);
1781  Vector u2 = ca2;
1782  }
1783 }
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_copyConstruction2 ( std::false_type  )

Definition at line 1764 of file StlVectorTest.cpp.

1764 {
template<class Vector >
void test_copyConstruction2 ( std::true_type  )

Definition at line 1764 of file StlVectorTest.cpp.

1764 {
template<class Vector >
void test_copyConstruction3 ( )

Definition at line 1764 of file StlVectorTest.cpp.

1764 {
template<class Vector , typename T , typename Allocator >
void test_copyWithAllocator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, m, ticks))))  )

Definition at line 2072 of file StlVectorTest.cpp.

2072  {
2073  DataState<Vector> dsa(a);
2074  const auto& ca = a;
2075  const auto& cm = m;
2076 
2077  Vector u(ca, cm);
2078 
2079  ASSERT_TRUE(u.get_allocator() == m);
2080  ASSERT_TRUE(dsa == u);
2081  ASSERT_TRUE(
2082  (ca.data() == nullptr && u.data() == nullptr) || (ca.data() != u.data()))
2083  << "only a shallow copy was made";
2084 }
static map< string, int > m
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_copyWithAllocator2 ( std::false_type  )

Definition at line 2072 of file StlVectorTest.cpp.

2072 {
template<class Vector >
void test_copyWithAllocator2 ( std::true_type  )

Definition at line 2072 of file StlVectorTest.cpp.

2072 {
template<class Vector >
void test_copyWithAllocator3 ( )

Definition at line 2072 of file StlVectorTest.cpp.

2072 {
template<class Vector , typename T , typename Allocator >
void test_customAllocator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, m, ticks))))  )

Definition at line 2060 of file StlVectorTest.cpp.

2060  {
2061  const auto& cm = m;
2062 
2063  Vector u(cm);
2064 
2065  ASSERT_TRUE(u.get_allocator() == m);
2066 
2067  if (false) {
2068  Vector t(m);
2069  }
2070 }
static map< string, int > m
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_customAllocator2 ( std::false_type  )

Definition at line 2060 of file StlVectorTest.cpp.

2060 {
template<class Vector >
void test_customAllocator2 ( std::true_type  )

Definition at line 2060 of file StlVectorTest.cpp.

2060 {
template<class Vector >
void test_customAllocator3 ( )

Definition at line 2060 of file StlVectorTest.cpp.

2060 {
template<class Vector , typename T , typename Allocator >
void test_dataAndCapacity ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2900 of file StlVectorTest.cpp.

2900  {
2901  // there isn't anything new to test here - data and capacity are used as the
2902  // backbone of DataState. The minimal testing we might want to do is already
2903  // done in the populate test
2904 }
template<class Vector >
void test_dataAndCapacity2 ( std::false_type  )

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
template<class Vector >
void test_dataAndCapacity2 ( std::true_type  )

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
template<class Vector >
void test_dataAndCapacity3 ( )

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
template<class Vector , typename T , typename Allocator >
void test_dataRaces ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2199 of file StlVectorTest.cpp.

2199  {
2200  if (false) {
2201  const Vector* cv = nullptr;
2202  typename Vector::size_type* s = nullptr;
2203 
2204  cv->begin();
2205  cv->end();
2206  cv->rbegin();
2207  cv->rend();
2208  cv->front();
2209  cv->back();
2210  cv->data();
2211 
2212  (*cv).at(*s);
2213  (*cv)[*s];
2214  }
2215 
2216  // White-box: check that the non-const versions of each of the above
2217  // functions is implemented in terms of (or the same as) the const version
2218 }
static set< string > s
template<class Vector >
void test_dataRaces2 ( std::true_type  )

Definition at line 2199 of file StlVectorTest.cpp.

2199 {
template<class Vector >
void test_dataRaces2 ( std::false_type  )

Definition at line 2199 of file StlVectorTest.cpp.

2199 {
template<class Vector >
void test_dataRaces3 ( )

Definition at line 2199 of file StlVectorTest.cpp.

2199 {
template<class Vector , typename T , typename Allocator >
void test_defaultAllocator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2056 of file StlVectorTest.cpp.

2056  {
2057  // there is nothing new to test here
2058 }
template<class Vector >
void test_defaultAllocator2 ( std::false_type  )

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
template<class Vector >
void test_defaultAllocator2 ( std::true_type  )

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
template<class Vector >
void test_defaultAllocator3 ( )

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
template<class Vector , typename T , typename Allocator >
void test_destructible ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 1819 of file StlVectorTest.cpp.

1819  {
1820  // The test generators check this clause already.
1821 }
template<class Vector >
void test_destructible2 ( std::false_type  )

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
template<class Vector >
void test_destructible2 ( std::true_type  )

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
template<class Vector >
void test_destructible3 ( )

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
template<class Vector , typename T , typename Allocator >
void test_ebo ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 3020 of file StlVectorTest.cpp.

3020  {
3021  static_assert(
3022  !is_same<Allocator, std::allocator<T>>::value ||
3023  sizeof(Vector) == 3 * sizeof(void*),
3024  "fbvector has default allocator, but has size != 3*sizeof(void*)");
3025 }
static const char *const value
Definition: Conv.cpp:50
template<class Vector >
void test_ebo2 ( std::false_type  )

Definition at line 3020 of file StlVectorTest.cpp.

3020 {
template<class Vector >
void test_ebo2 ( std::true_type  )

Definition at line 3020 of file StlVectorTest.cpp.

3020 {
template<class Vector >
void test_ebo3 ( )

Definition at line 3020 of file StlVectorTest.cpp.

3020 {
template<class Vector , typename T , typename Allocator >
void test_emplaceBack ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2742 of file StlVectorTest.cpp.

2742  {
2743  DataState<Vector> dsa(a);
2744  auto adata = a.data();
2745  int excess = a.capacity() - a.size();
2746  auto am = a.get_allocator();
2747 
2748  try {
2749  a.emplace_back(44);
2750  } catch (...) {
2751  ASSERT_TRUE(dsa == a) << "failed strong exception guarantee";
2752  throw;
2753  }
2754 
2755  ASSERT_TRUE(am == a.get_allocator());
2756  if (excess > 0) {
2757  ASSERT_TRUE(a.data() == adata) << "unnecessary relocation";
2758  }
2759  ASSERT_EQ(dsa.size() + 1, a.size());
2760  size_t i = 0;
2761  auto it = a.begin();
2762  for (; i < dsa.size(); ++i, ++it) {
2763  ASSERT_EQ(dsa[i], convertToInt(*it));
2764  }
2765  ASSERT_EQ(44, convertToInt(a.back()));
2766 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_emplaceBack2 ( std::false_type  )

Definition at line 2742 of file StlVectorTest.cpp.

2742 {
template<class Vector >
void test_emplaceBack2 ( std::true_type  )

Definition at line 2742 of file StlVectorTest.cpp.

2742 {
template<class Vector >
void test_emplaceBack3 ( )

Definition at line 2742 of file StlVectorTest.cpp.

2742 {
template<class Vector , typename T , typename Allocator >
void test_emptyConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 1715 of file StlVectorTest.cpp.

1715  {
1716  Vector u;
1717 
1718  ASSERT_TRUE(u.get_allocator() == Allocator());
1720 
1721  ASSERT_TRUE(u.empty()) << u.size();
1722  ASSERT_EQ(0, u.capacity());
1723 
1724  if (false) {
1725  Vector();
1726  }
1727 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_emptyConstruction2 ( std::true_type  )

Definition at line 1715 of file StlVectorTest.cpp.

1715 {
template<class Vector >
void test_emptyConstruction2 ( std::false_type  )

Definition at line 1715 of file StlVectorTest.cpp.

1715 {
template<class Vector >
void test_emptyConstruction3 ( )

Definition at line 1715 of file StlVectorTest.cpp.

1715 {
template<class Vector , typename T , typename Allocator >
void test_equitable ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks))))  )

Definition at line 1855 of file StlVectorTest.cpp.

1855  {
1856  const auto& ca = a;
1857  const auto& cb = b;
1858  DataState<Vector> dsa(a);
1859  DataState<Vector> dsb(b);
1860 
1861  ASSERT_TRUE((bool)(ca == cb) == (bool)(dsa == dsb))
1862  << "== does not return equality";
1863  ASSERT_TRUE((bool)(ca == cb) != (bool)(ca != cb))
1864  << "!= is not the opposite of ==";
1865 
1866  // Data is uncomparable, by design; therefore this test's restriction
1867  // is 'is_arithmetic'
1868 }
char b
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_equitable2 ( std::false_type  )

Definition at line 1855 of file StlVectorTest.cpp.

1855 {
template<class Vector >
void test_equitable2 ( std::true_type  )

Definition at line 1855 of file StlVectorTest.cpp.

1855 {
template<class Vector >
void test_equitable3 ( )

Definition at line 1855 of file StlVectorTest.cpp.

1855 {
template<class Vector , typename T , typename Allocator >
void test_forwardIteratorAllocConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, i,j,m, ticks))))  )

Definition at line 2148 of file StlVectorTest.cpp.

2148  {
2149  auto fi = makeForwardIterator(i);
2150  auto fj = makeForwardIterator(j);
2151  const auto& cfi = fi;
2152  const auto& cfj = fj;
2153  const auto& cm = m;
2154 
2155  Vector u(cfi, cfj, cm);
2156 
2157  ASSERT_TRUE(m == u.get_allocator());
2158 }
Transformer< It, forward_iterator_tag > makeForwardIterator(const It &it)
static map< string, int > m
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_forwardIteratorAllocConstruction2 ( std::false_type  )

Definition at line 2148 of file StlVectorTest.cpp.

2148 {
template<class Vector >
void test_forwardIteratorAllocConstruction2 ( std::true_type  )

Definition at line 2148 of file StlVectorTest.cpp.

2148 {
template<class Vector >
void test_forwardIteratorAllocConstruction3 ( )

Definition at line 2148 of file StlVectorTest.cpp.

2148 {
template<class Vector , typename T , typename Allocator >
void test_forwardIteratorConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, i,j, ticks))))  )

Definition at line 2249 of file StlVectorTest.cpp.

2249  {
2250  // All data is emplace-constructible from int, so we restrict to
2251  // is_destructible
2252 
2253  auto fi = makeForwardIterator(i);
2254  auto fj = makeForwardIterator(j);
2255  const auto& cfi = fi;
2256  const auto& cfj = fj;
2257 
2258  Vector u(cfi, cfj);
2259 
2260  ASSERT_TRUE(Allocator() == u.get_allocator());
2262 
2263  ASSERT_EQ(j - i, u.size()) << "u(i,j).size() != j-i";
2264  for (auto it = u.begin(); it != u.end(); ++it, ++i) {
2265  ASSERT_EQ(*i, convertToInt(*it)) << "u(i,j) constructed incorrectly";
2266  }
2267 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
Transformer< It, forward_iterator_tag > makeForwardIterator(const It &it)
#define ASSERT_LE(val1, val2)
Definition: gtest.h:1964
static int CountTotalOps
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_forwardIteratorConstruction2 ( std::true_type  )

Definition at line 2249 of file StlVectorTest.cpp.

2249 {
template<class Vector >
void test_forwardIteratorConstruction2 ( std::false_type  )

Definition at line 2249 of file StlVectorTest.cpp.

2249 {
template<class Vector >
void test_forwardIteratorConstruction3 ( )

Definition at line 2249 of file StlVectorTest.cpp.

2249 {
template<class Vector , typename T , typename Allocator >
void test_front ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2710 of file StlVectorTest.cpp.

2710  {
2711  if (a.empty()) {
2712  return;
2713  }
2714 
2715  ASSERT_TRUE(addressof(a.front()) == a.data());
2716 
2718 
2719  if (false) {
2720  mutate(a.front());
2721  const Vector& ca = a;
2722  ca.front();
2723  }
2724 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
char a
void mutate(int &i)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_front2 ( std::false_type  )

Definition at line 2710 of file StlVectorTest.cpp.

2710 {
template<class Vector >
void test_front2 ( std::true_type  )

Definition at line 2710 of file StlVectorTest.cpp.

2710 {
template<class Vector >
void test_front3 ( )

Definition at line 2710 of file StlVectorTest.cpp.

2710 {
template<class Vector , typename T , typename Allocator >
void test_getAllocator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2052 of file StlVectorTest.cpp.

2052  {
2053  // whitebox: ensure that a.get_allocator() returns a copy of its allocator
2054 }
template<class Vector >
void test_getAllocator2 ( std::false_type  )

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
template<class Vector >
void test_getAllocator2 ( std::true_type  )

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
template<class Vector >
void test_getAllocator3 ( )

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
template<class Vector >
bool test_I_allocAssign2 ( std::false_type  )

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
template<class Vector >
bool test_I_allocAssign2 ( std::true_type  )

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
template<class Vector >
bool test_I_allocAssign3 ( )

Definition at line 2119 of file StlVectorTest.cpp.

2119 {
template<class Vector >
bool test_I_allocatorTypedefs2 ( std::false_type  )

Definition at line 2046 of file StlVectorTest.cpp.

2046 {
template<class Vector >
bool test_I_allocatorTypedefs2 ( std::true_type  )

Definition at line 2046 of file StlVectorTest.cpp.

2046 {
template<class Vector >
bool test_I_allocatorTypedefs3 ( )

Definition at line 2046 of file StlVectorTest.cpp.

References value.

2046 {
template<class Vector >
bool test_I_assignIL2 ( std::false_type  )

Definition at line 2667 of file StlVectorTest.cpp.

2667 {
template<class Vector >
bool test_I_assignIL2 ( std::true_type  )

Definition at line 2667 of file StlVectorTest.cpp.

2667 {
template<class Vector >
bool test_I_assignIL3 ( )

Definition at line 2667 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, STL_TEST, and Ticker::TicksLeft.

2667 {
template<class Vector >
bool test_I_assignInputRange2 ( std::false_type  )

Definition at line 2651 of file StlVectorTest.cpp.

2651 {
template<class Vector >
bool test_I_assignInputRange2 ( std::true_type  )

Definition at line 2651 of file StlVectorTest.cpp.

2651 {
template<class Vector >
bool test_I_assignInputRange3 ( )

Definition at line 2651 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, and makeInputIterator().

2651 {
template<class Vector >
bool test_I_assignN2 ( std::false_type  )

Definition at line 2696 of file StlVectorTest.cpp.

2696 {
template<class Vector >
bool test_I_assignN2 ( std::true_type  )

Definition at line 2696 of file StlVectorTest.cpp.

2696 {
template<class Vector >
bool test_I_assignN3 ( )

Definition at line 2696 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), and folly::pushmi::detail::t.

2696 {
template<class Vector >
bool test_I_assignRange2 ( std::false_type  )

Definition at line 2629 of file StlVectorTest.cpp.

2629 {
template<class Vector >
bool test_I_assignRange2 ( std::true_type  )

Definition at line 2629 of file StlVectorTest.cpp.

2629 {
template<class Vector >
bool test_I_assignRange3 ( )

Definition at line 2629 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, makeForwardIterator(), and STL_TEST.

2629 {
template<class Vector >
bool test_I_at2 ( std::false_type  )

Definition at line 2855 of file StlVectorTest.cpp.

2855 {
template<class Vector >
bool test_I_at2 ( std::true_type  )

Definition at line 2855 of file StlVectorTest.cpp.

2855 {
template<class Vector >
bool test_I_at3 ( )

Definition at line 2855 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, FAIL, i, and mutate().

2855 {
template<class Vector >
bool test_I_attach2 ( std::false_type  )

Definition at line 3053 of file StlVectorTest.cpp.

3053 {
template<class Vector >
bool test_I_attach2 ( std::true_type  )

Definition at line 3053 of file StlVectorTest.cpp.

3053 {
template<class Vector >
bool test_I_attach3 ( )

Definition at line 3053 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, folly::attach(), and folly::relinquish().

3053 {
template<class Vector >
bool test_I_back2 ( std::false_type  )

Definition at line 2726 of file StlVectorTest.cpp.

2726 {
template<class Vector >
bool test_I_back2 ( std::true_type  )

Definition at line 2726 of file StlVectorTest.cpp.

2726 {
template<class Vector >
bool test_I_back3 ( )

Definition at line 2726 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, and mutate().

2726 {
template<class Vector >
bool test_I_clear2 ( std::false_type  )

Definition at line 2616 of file StlVectorTest.cpp.

2616 {
template<class Vector >
bool test_I_clear2 ( std::true_type  )

Definition at line 2616 of file StlVectorTest.cpp.

2616 {
template<class Vector >
bool test_I_clear3 ( )

Definition at line 2616 of file StlVectorTest.cpp.

References a, ASSERT_TRUE, and FAIL.

2616 {
template<class Vector >
bool test_I_comparable2 ( std::false_type  )

Definition at line 2027 of file StlVectorTest.cpp.

2027 {
template<class Vector >
bool test_I_comparable2 ( std::true_type  )

Definition at line 2027 of file StlVectorTest.cpp.

2027 {
template<class Vector >
bool test_I_comparable3 ( )

Definition at line 2027 of file StlVectorTest.cpp.

References ASSERT_TRUE.

2027 {
template<class Vector >
bool test_I_containerTypedefs2 ( std::false_type  )

Definition at line 1652 of file StlVectorTest.cpp.

1652 {
template<class Vector >
bool test_I_containerTypedefs2 ( std::true_type  )

Definition at line 1652 of file StlVectorTest.cpp.

1652 {
template<class Vector >
bool test_I_containerTypedefs3 ( )

Definition at line 1652 of file StlVectorTest.cpp.

References T, and value.

1652 {
template<class Vector >
bool test_I_copyAssign2 ( std::false_type  )

Definition at line 1941 of file StlVectorTest.cpp.

1941 {
template<class Vector >
bool test_I_copyAssign2 ( std::true_type  )

Definition at line 1941 of file StlVectorTest.cpp.

1941 {
template<class Vector >
bool test_I_copyAssign3 ( )

Definition at line 1941 of file StlVectorTest.cpp.

References a, ASSERT_TRUE, b, convertToInt(), and value.

1941 {
template<class Vector >
bool test_I_copyConstruction2 ( std::false_type  )

Definition at line 1764 of file StlVectorTest.cpp.

1764 {
template<class Vector >
bool test_I_copyConstruction2 ( std::true_type  )

Definition at line 1764 of file StlVectorTest.cpp.

1764 {
template<class Vector >
bool test_I_copyConstruction3 ( )

Definition at line 1764 of file StlVectorTest.cpp.

References a, and ASSERT_TRUE.

1764 {
template<class Vector >
bool test_I_copyWithAllocator2 ( std::false_type  )

Definition at line 2072 of file StlVectorTest.cpp.

2072 {
template<class Vector >
bool test_I_copyWithAllocator2 ( std::true_type  )

Definition at line 2072 of file StlVectorTest.cpp.

2072 {
template<class Vector >
bool test_I_copyWithAllocator3 ( )

Definition at line 2072 of file StlVectorTest.cpp.

References a, ASSERT_TRUE, m, and STL_TEST.

2072 {
template<class Vector >
bool test_I_customAllocator2 ( std::false_type  )

Definition at line 2060 of file StlVectorTest.cpp.

2060 {
template<class Vector >
bool test_I_customAllocator2 ( std::true_type  )

Definition at line 2060 of file StlVectorTest.cpp.

2060 {
template<class Vector >
bool test_I_customAllocator3 ( )

Definition at line 2060 of file StlVectorTest.cpp.

References ASSERT_TRUE, m, and folly::pushmi::detail::t.

2060 {
template<class Vector >
bool test_I_dataAndCapacity2 ( std::false_type  )

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
template<class Vector >
bool test_I_dataAndCapacity2 ( std::true_type  )

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
template<class Vector >
bool test_I_dataAndCapacity3 ( )

Definition at line 2900 of file StlVectorTest.cpp.

2900 {
template<class Vector >
bool test_I_dataRaces2 ( std::false_type  )

Definition at line 2199 of file StlVectorTest.cpp.

2199 {
template<class Vector >
bool test_I_dataRaces2 ( std::true_type  )

Definition at line 2199 of file StlVectorTest.cpp.

2199 {
template<class Vector >
bool test_I_dataRaces3 ( )

Definition at line 2199 of file StlVectorTest.cpp.

References s.

2199 {
template<class Vector >
bool test_I_defaultAllocator2 ( std::true_type  )

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
template<class Vector >
bool test_I_defaultAllocator2 ( std::false_type  )

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
template<class Vector >
bool test_I_defaultAllocator3 ( )

Definition at line 2056 of file StlVectorTest.cpp.

2056 {
template<class Vector >
bool test_I_destructible2 ( std::false_type  )

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
template<class Vector >
bool test_I_destructible2 ( std::true_type  )

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
template<class Vector >
bool test_I_destructible3 ( )

Definition at line 1819 of file StlVectorTest.cpp.

1819 {
template<class Vector >
bool test_I_ebo2 ( std::false_type  )

Definition at line 3020 of file StlVectorTest.cpp.

3020 {
template<class Vector >
bool test_I_ebo2 ( std::true_type  )

Definition at line 3020 of file StlVectorTest.cpp.

3020 {
template<class Vector >
bool test_I_ebo3 ( )

Definition at line 3020 of file StlVectorTest.cpp.

References value.

3020 {
template<class Vector >
bool test_I_emplaceBack2 ( std::false_type  )

Definition at line 2742 of file StlVectorTest.cpp.

2742 {
template<class Vector >
bool test_I_emplaceBack2 ( std::true_type  )

Definition at line 2742 of file StlVectorTest.cpp.

2742 {
template<class Vector >
bool test_I_emplaceBack3 ( )

Definition at line 2742 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, and DataState< Vector >::size().

2742 {
template<class Vector >
bool test_I_emptyConstruction2 ( std::false_type  )

Definition at line 1715 of file StlVectorTest.cpp.

1715 {
template<class Vector >
bool test_I_emptyConstruction2 ( std::true_type  )

Definition at line 1715 of file StlVectorTest.cpp.

1715 {
template<class Vector >
bool test_I_emptyConstruction3 ( )

Definition at line 1715 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_TRUE, and Counter::CountTotalOps.

1715 {
template<class Vector >
bool test_I_equitable2 ( std::false_type  )

Definition at line 1855 of file StlVectorTest.cpp.

1855 {
template<class Vector >
bool test_I_equitable2 ( std::true_type  )

Definition at line 1855 of file StlVectorTest.cpp.

1855 {
template<class Vector >
bool test_I_equitable3 ( )

Definition at line 1855 of file StlVectorTest.cpp.

References a, ASSERT_TRUE, and b.

1855 {
template<class Vector >
bool test_I_forwardIteratorAllocConstruction2 ( std::false_type  )

Definition at line 2148 of file StlVectorTest.cpp.

2148 {
template<class Vector >
bool test_I_forwardIteratorAllocConstruction2 ( std::true_type  )

Definition at line 2148 of file StlVectorTest.cpp.

2148 {
template<class Vector >
bool test_I_forwardIteratorAllocConstruction3 ( )

Definition at line 2148 of file StlVectorTest.cpp.

References ASSERT_TRUE, i, m, makeForwardIterator(), and STL_TEST.

2148 {
template<class Vector >
bool test_I_forwardIteratorConstruction2 ( std::true_type  )

Definition at line 2249 of file StlVectorTest.cpp.

2249 {
template<class Vector >
bool test_I_forwardIteratorConstruction2 ( std::false_type  )

Definition at line 2249 of file StlVectorTest.cpp.

2249 {
template<class Vector >
bool test_I_forwardIteratorConstruction3 ( )
template<class Vector >
bool test_I_front2 ( std::false_type  )

Definition at line 2710 of file StlVectorTest.cpp.

2710 {
template<class Vector >
bool test_I_front2 ( std::true_type  )

Definition at line 2710 of file StlVectorTest.cpp.

2710 {
template<class Vector >
bool test_I_front3 ( )

Definition at line 2710 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, and mutate().

2710 {
template<class Vector >
bool test_I_getAllocator2 ( std::false_type  )

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
template<class Vector >
bool test_I_getAllocator2 ( std::true_type  )

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
template<class Vector >
bool test_I_getAllocator3 ( )

Definition at line 2052 of file StlVectorTest.cpp.

2052 {
template<class Vector >
bool test_I_ilAllocConstruction2 ( std::false_type  )

Definition at line 2183 of file StlVectorTest.cpp.

2183 {
template<class Vector >
bool test_I_ilAllocConstruction2 ( std::true_type  )

Definition at line 2183 of file StlVectorTest.cpp.

2183 {
template<class Vector >
bool test_I_ilAllocConstruction3 ( )

Definition at line 2183 of file StlVectorTest.cpp.

2183 {
template<class Vector >
bool test_I_ilAssignment2 ( std::false_type  )

Definition at line 2314 of file StlVectorTest.cpp.

2314 {
template<class Vector >
bool test_I_ilAssignment2 ( std::true_type  )

Definition at line 2314 of file StlVectorTest.cpp.

2314 {
template<class Vector >
bool test_I_ilAssignment3 ( )

Definition at line 2314 of file StlVectorTest.cpp.

2314 {
template<class Vector >
bool test_I_ilConstruction2 ( std::false_type  )

Definition at line 2294 of file StlVectorTest.cpp.

2294 {
template<class Vector >
bool test_I_ilConstruction2 ( std::true_type  )

Definition at line 2294 of file StlVectorTest.cpp.

2294 {
template<class Vector >
bool test_I_ilConstruction3 ( )

Definition at line 2294 of file StlVectorTest.cpp.

2294 {
template<class Vector >
bool test_I_inputIteratorAllocConstruction2 ( std::false_type  )

Definition at line 2166 of file StlVectorTest.cpp.

2166 {
template<class Vector >
bool test_I_inputIteratorAllocConstruction2 ( std::true_type  )

Definition at line 2166 of file StlVectorTest.cpp.

2166 {
template<class Vector >
bool test_I_inputIteratorAllocConstruction3 ( )

Definition at line 2166 of file StlVectorTest.cpp.

2166 {
template<class Vector >
bool test_I_inputIteratorConstruction2 ( std::false_type  )

Definition at line 2274 of file StlVectorTest.cpp.

2274 {
template<class Vector >
bool test_I_inputIteratorConstruction2 ( std::true_type  )

Definition at line 2274 of file StlVectorTest.cpp.

2274 {
template<class Vector >
bool test_I_inputIteratorConstruction3 ( )

Definition at line 2274 of file StlVectorTest.cpp.

2274 {
template<class Vector >
bool test_I_iteratorEmplacement2 ( std::false_type  )

Definition at line 2366 of file StlVectorTest.cpp.

2366 {
template<class Vector >
bool test_I_iteratorEmplacement2 ( std::true_type  )

Definition at line 2366 of file StlVectorTest.cpp.

2366 {
template<class Vector >
bool test_I_iteratorEmplacement3 ( )

Definition at line 2366 of file StlVectorTest.cpp.

2366 {
template<class Vector >
bool test_I_iteratorErase2 ( std::false_type  )

Definition at line 2575 of file StlVectorTest.cpp.

2575 {
template<class Vector >
bool test_I_iteratorErase2 ( std::true_type  )

Definition at line 2575 of file StlVectorTest.cpp.

2575 {
template<class Vector >
bool test_I_iteratorErase3 ( )

Definition at line 2575 of file StlVectorTest.cpp.

2575 {
template<class Vector >
bool test_I_iteratorEraseRange2 ( std::false_type  )

Definition at line 2597 of file StlVectorTest.cpp.

2597 {
template<class Vector >
bool test_I_iteratorEraseRange2 ( std::true_type  )

Definition at line 2597 of file StlVectorTest.cpp.

2597 {
template<class Vector >
bool test_I_iteratorEraseRange3 ( )

Definition at line 2597 of file StlVectorTest.cpp.

2597 {
template<class Vector >
bool test_I_iteratorInsertIL2 ( std::false_type  )

Definition at line 2532 of file StlVectorTest.cpp.

2532 {
template<class Vector >
bool test_I_iteratorInsertIL2 ( std::true_type  )

Definition at line 2532 of file StlVectorTest.cpp.

2532 {
template<class Vector >
bool test_I_iteratorInsertIL3 ( )

Definition at line 2532 of file StlVectorTest.cpp.

2532 {
template<class Vector >
bool test_I_iteratorInsertion2 ( std::false_type  )

Definition at line 2384 of file StlVectorTest.cpp.

2384 {
template<class Vector >
bool test_I_iteratorInsertion2 ( std::true_type  )

Definition at line 2384 of file StlVectorTest.cpp.

2384 {
template<class Vector >
bool test_I_iteratorInsertion3 ( )

Definition at line 2384 of file StlVectorTest.cpp.

2384 {
template<class Vector >
bool test_I_iteratorInsertionInputIterator2 ( std::false_type  )

Definition at line 2508 of file StlVectorTest.cpp.

2508 {
template<class Vector >
bool test_I_iteratorInsertionInputIterator2 ( std::true_type  )

Definition at line 2508 of file StlVectorTest.cpp.

2508 {
template<class Vector >
bool test_I_iteratorInsertionInputIterator3 ( )

Definition at line 2508 of file StlVectorTest.cpp.

2508 {
template<class Vector >
bool test_I_iteratorInsertionIterator2 ( std::false_type  )

Definition at line 2477 of file StlVectorTest.cpp.

2477 {
template<class Vector >
bool test_I_iteratorInsertionIterator2 ( std::true_type  )

Definition at line 2477 of file StlVectorTest.cpp.

2477 {
template<class Vector >
bool test_I_iteratorInsertionIterator3 ( )

Definition at line 2477 of file StlVectorTest.cpp.

2477 {
template<class Vector >
bool test_I_iteratorInsertionN2 ( std::false_type  )

Definition at line 2429 of file StlVectorTest.cpp.

2429 {
template<class Vector >
bool test_I_iteratorInsertionN2 ( std::true_type  )

Definition at line 2429 of file StlVectorTest.cpp.

2429 {
template<class Vector >
bool test_I_iteratorInsertionN3 ( )

Definition at line 2429 of file StlVectorTest.cpp.

2429 {
template<class Vector >
bool test_I_iteratorInsertionRV2 ( std::false_type  )

Definition at line 2404 of file StlVectorTest.cpp.

2404 {
template<class Vector >
bool test_I_iteratorInsertionRV2 ( std::true_type  )

Definition at line 2404 of file StlVectorTest.cpp.

2404 {
template<class Vector >
bool test_I_iteratorInsertionRV3 ( )

Definition at line 2404 of file StlVectorTest.cpp.

2404 {
template<class Vector >
bool test_I_iterators2 ( std::false_type  )

Definition at line 1823 of file StlVectorTest.cpp.

1823 {
template<class Vector >
bool test_I_iterators2 ( std::true_type  )

Definition at line 1823 of file StlVectorTest.cpp.

1823 {
template<class Vector >
bool test_I_iterators3 ( )

Definition at line 1823 of file StlVectorTest.cpp.

1823 {
template<class Vector >
bool test_I_lengthError2 ( std::false_type  )

Definition at line 2923 of file StlVectorTest.cpp.

2923 {
template<class Vector >
bool test_I_lengthError2 ( std::true_type  )

Definition at line 2923 of file StlVectorTest.cpp.

2923 {
template<class Vector >
bool test_I_lengthError3 ( )

Definition at line 2923 of file StlVectorTest.cpp.

2923 {
template<class Vector >
bool test_I_memberSwappable2 ( std::false_type  )

Definition at line 1870 of file StlVectorTest.cpp.

1870 {
template<class Vector >
bool test_I_memberSwappable2 ( std::true_type  )

Definition at line 1870 of file StlVectorTest.cpp.

1870 {
template<class Vector >
bool test_I_memberSwappable3 ( )

Definition at line 1870 of file StlVectorTest.cpp.

1870 {
template<class Vector >
bool test_I_moveAssignment2 ( std::false_type  )

Definition at line 1801 of file StlVectorTest.cpp.

1801 {
template<class Vector >
bool test_I_moveAssignment2 ( std::true_type  )

Definition at line 1801 of file StlVectorTest.cpp.

1801 {
template<class Vector >
bool test_I_moveAssignment3 ( )

Definition at line 1801 of file StlVectorTest.cpp.

1801 {
template<class Vector >
bool test_I_moveConstruction2 ( std::false_type  )

Definition at line 1785 of file StlVectorTest.cpp.

1785 {
template<class Vector >
bool test_I_moveConstruction2 ( std::true_type  )

Definition at line 1785 of file StlVectorTest.cpp.

1785 {
template<class Vector >
bool test_I_moveConstruction3 ( )

Definition at line 1785 of file StlVectorTest.cpp.

1785 {
template<class Vector >
bool test_I_moveConstructionWithAllocator2 ( std::false_type  )

Definition at line 2090 of file StlVectorTest.cpp.

2090 {
template<class Vector >
bool test_I_moveConstructionWithAllocator2 ( std::true_type  )

Definition at line 2090 of file StlVectorTest.cpp.

2090 {
template<class Vector >
bool test_I_moveConstructionWithAllocator3 ( )

Definition at line 2090 of file StlVectorTest.cpp.

2090 {
template<class Vector >
bool test_I_moveConstructionWithAllocatorSupplied2 ( std::false_type  )

Definition at line 2100 of file StlVectorTest.cpp.

2100 {
template<class Vector >
bool test_I_moveConstructionWithAllocatorSupplied2 ( std::true_type  )

Definition at line 2100 of file StlVectorTest.cpp.

2100 {
template<class Vector >
bool test_I_moveConstructionWithAllocatorSupplied3 ( )

Definition at line 2100 of file StlVectorTest.cpp.

2100 {
template<class Vector >
bool test_I_moveIterators2 ( std::false_type  )

Definition at line 2876 of file StlVectorTest.cpp.

2876 {
template<class Vector >
bool test_I_moveIterators2 ( std::true_type  )

Definition at line 2876 of file StlVectorTest.cpp.

2876 {
template<class Vector >
bool test_I_moveIterators3 ( )

Definition at line 2876 of file StlVectorTest.cpp.

2876 {
template<class Vector >
bool test_I_nAllocConstruction2 ( std::true_type  )

Definition at line 2123 of file StlVectorTest.cpp.

2123 {
template<class Vector >
bool test_I_nAllocConstruction2 ( std::false_type  )

Definition at line 2123 of file StlVectorTest.cpp.

2123 {
template<class Vector >
bool test_I_nAllocConstruction3 ( )

Definition at line 2123 of file StlVectorTest.cpp.

2123 {
template<class Vector >
bool test_I_nConstruction2 ( std::false_type  )

Definition at line 2223 of file StlVectorTest.cpp.

2223 {
template<class Vector >
bool test_I_nConstruction2 ( std::true_type  )

Definition at line 2223 of file StlVectorTest.cpp.

2223 {
template<class Vector >
bool test_I_nConstruction3 ( )

Definition at line 2223 of file StlVectorTest.cpp.

2223 {
template<class Vector >
bool test_I_nCopyAllocConstruction2 ( std::false_type  )

Definition at line 2133 of file StlVectorTest.cpp.

2133 {
template<class Vector >
bool test_I_nCopyAllocConstruction2 ( std::true_type  )

Definition at line 2133 of file StlVectorTest.cpp.

2133 {
template<class Vector >
bool test_I_nCopyAllocConstruction3 ( )

Definition at line 2133 of file StlVectorTest.cpp.

2133 {
template<class Vector >
bool test_I_nCopyConstruction2 ( std::false_type  )

Definition at line 2231 of file StlVectorTest.cpp.

2231 {
template<class Vector >
bool test_I_nCopyConstruction2 ( std::true_type  )

Definition at line 2231 of file StlVectorTest.cpp.

2231 {
template<class Vector >
bool test_I_nCopyConstruction3 ( )

Definition at line 2231 of file StlVectorTest.cpp.

2231 {
template<class Vector >
bool test_I_nonmemberSwappable2 ( std::false_type  )

Definition at line 1903 of file StlVectorTest.cpp.

1903 {
template<class Vector >
bool test_I_nonmemberSwappable2 ( std::true_type  )

Definition at line 1903 of file StlVectorTest.cpp.

1903 {
template<class Vector >
bool test_I_nonmemberSwappable3 ( )

Definition at line 1903 of file StlVectorTest.cpp.

1903 {
template<class Vector >
bool test_I_operatorBrace2 ( std::false_type  )

Definition at line 2842 of file StlVectorTest.cpp.

2842 {
template<class Vector >
bool test_I_operatorBrace2 ( std::true_type  )

Definition at line 2842 of file StlVectorTest.cpp.

2842 {
template<class Vector >
bool test_I_operatorBrace3 ( )

Definition at line 2842 of file StlVectorTest.cpp.

2842 {
template<class Vector >
bool test_I_popBack2 ( std::false_type  )

Definition at line 2823 of file StlVectorTest.cpp.

2823 {
template<class Vector >
bool test_I_popBack2 ( std::true_type  )

Definition at line 2823 of file StlVectorTest.cpp.

2823 {
template<class Vector >
bool test_I_popBack3 ( )

Definition at line 2823 of file StlVectorTest.cpp.

2823 {
template<class Vector >
bool test_I_populate2 ( std::false_type  )

Definition at line 1729 of file StlVectorTest.cpp.

1729 {
template<class Vector >
bool test_I_populate2 ( std::true_type  )

Definition at line 1729 of file StlVectorTest.cpp.

1729 {
template<class Vector >
bool test_I_populate3 ( )

Definition at line 1729 of file StlVectorTest.cpp.

1729 {
template<class Vector >
bool test_I_pushBack2 ( std::false_type  )

Definition at line 2768 of file StlVectorTest.cpp.

2768 {
template<class Vector >
bool test_I_pushBack2 ( std::true_type  )

Definition at line 2768 of file StlVectorTest.cpp.

2768 {
template<class Vector >
bool test_I_pushBack3 ( )

Definition at line 2768 of file StlVectorTest.cpp.

2768 {
template<class Vector >
bool test_I_pushBackRV2 ( std::false_type  )

Definition at line 2796 of file StlVectorTest.cpp.

2796 {
template<class Vector >
bool test_I_pushBackRV2 ( std::true_type  )

Definition at line 2796 of file StlVectorTest.cpp.

2796 {
template<class Vector >
bool test_I_pushBackRV3 ( )

Definition at line 2796 of file StlVectorTest.cpp.

2796 {
template<class Vector >
bool test_I_relinquish2 ( std::false_type  )

Definition at line 3027 of file StlVectorTest.cpp.

3027 {
template<class Vector >
bool test_I_relinquish2 ( std::true_type  )

Definition at line 3027 of file StlVectorTest.cpp.

3027 {
template<class Vector >
bool test_I_relinquish3 ( )

Definition at line 3027 of file StlVectorTest.cpp.

3027 {
template<class Vector >
bool test_I_reserve2 ( std::true_type  )

Definition at line 2906 of file StlVectorTest.cpp.

2906 {
template<class Vector >
bool test_I_reserve2 ( std::false_type  )

Definition at line 2906 of file StlVectorTest.cpp.

2906 {
template<class Vector >
bool test_I_reserve3 ( )

Definition at line 2906 of file StlVectorTest.cpp.

2906 {
template<class Vector >
bool test_I_resize2 ( std::false_type  )

Definition at line 2940 of file StlVectorTest.cpp.

2940 {
template<class Vector >
bool test_I_resize2 ( std::true_type  )

Definition at line 2940 of file StlVectorTest.cpp.

2940 {
template<class Vector >
bool test_I_resize3 ( )

Definition at line 2940 of file StlVectorTest.cpp.

2940 {
template<class Vector >
bool test_I_resizeT2 ( std::true_type  )

Definition at line 2961 of file StlVectorTest.cpp.

2961 {
template<class Vector >
bool test_I_resizeT2 ( std::false_type  )

Definition at line 2961 of file StlVectorTest.cpp.

2961 {
template<class Vector >
bool test_I_resizeT3 ( )

Definition at line 2961 of file StlVectorTest.cpp.

2961 {
template<class Vector >
bool test_I_reversibleContainerTypedefs2 ( std::false_type  )

Definition at line 1978 of file StlVectorTest.cpp.

1978 {
template<class Vector >
bool test_I_reversibleContainerTypedefs2 ( std::true_type  )

Definition at line 1978 of file StlVectorTest.cpp.

1978 {
template<class Vector >
bool test_I_reversibleContainerTypedefs3 ( )

Definition at line 1978 of file StlVectorTest.cpp.

1978 {
template<class Vector >
bool test_I_reversibleIterators2 ( std::true_type  )

Definition at line 1992 of file StlVectorTest.cpp.

1992 {
template<class Vector >
bool test_I_reversibleIterators2 ( std::false_type  )

Definition at line 1992 of file StlVectorTest.cpp.

1992 {
template<class Vector >
bool test_I_reversibleIterators3 ( )

Definition at line 1992 of file StlVectorTest.cpp.

1992 {
template<class Vector >
bool test_I_shrinkToFit2 ( std::false_type  )

Definition at line 2993 of file StlVectorTest.cpp.

2993 {
template<class Vector >
bool test_I_shrinkToFit2 ( std::true_type  )

Definition at line 2993 of file StlVectorTest.cpp.

2993 {
template<class Vector >
bool test_I_shrinkToFit3 ( )

Definition at line 2993 of file StlVectorTest.cpp.

2993 {
template<class Vector >
bool test_I_sizeops2 ( std::false_type  )

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
template<class Vector >
bool test_I_sizeops2 ( std::true_type  )

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
template<class Vector >
bool test_I_sizeops3 ( )

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
template<class Vector , typename T , typename Allocator >
void test_ilAllocConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, m, ticks))))  )

Definition at line 2183 of file StlVectorTest.cpp.

2183  {
2184  // gcc fail
2185  if (Ticker::TicksLeft >= 0) {
2186  return;
2187  }
2188 
2189  const auto& cm = m;
2190 
2191  Vector u({1, 4, 7}, cm);
2192 
2193  ASSERT_TRUE(m == u.get_allocator());
2194 }
static int TicksLeft
static map< string, int > m
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_ilAllocConstruction2 ( std::true_type  )

Definition at line 2183 of file StlVectorTest.cpp.

2183 {
template<class Vector >
void test_ilAllocConstruction2 ( std::false_type  )

Definition at line 2183 of file StlVectorTest.cpp.

2183 {
template<class Vector >
void test_ilAllocConstruction3 ( )

Definition at line 2183 of file StlVectorTest.cpp.

References ASSERT_TRUE, m, and Ticker::TicksLeft.

2183 {
template<class Vector , typename T , typename Allocator >
void test_ilAssignment ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2314 of file StlVectorTest.cpp.

2314  {
2315  // whitebox: ensure that assign(il) is implemented in terms of
2316  // assign(il.begin(), il.end())
2317 
2318  // gcc fail
2319  if (Ticker::TicksLeft >= 0) {
2320  return;
2321  }
2322 
2323  auto am = a.get_allocator();
2324 
2325  Vector& b = a = {1, 4, 7};
2326 
2327  ASSERT_TRUE(am == a.get_allocator());
2328  ASSERT_TRUE(&b == &a) << "'a = ...' did not return *this";
2329 
2330  ASSERT_EQ(3, a.size()) << "u(il).size() fail";
2331  int i = 1;
2332  auto it = a.begin();
2333  for (; it != a.end(); ++it, i += 3) {
2334  ASSERT_EQ(i, convertToInt(*it)) << "u(il) constructed incorrectly";
2335  }
2336 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char b
static int TicksLeft
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_ilAssignment2 ( std::true_type  )

Definition at line 2314 of file StlVectorTest.cpp.

2314 {
template<class Vector >
void test_ilAssignment2 ( std::false_type  )

Definition at line 2314 of file StlVectorTest.cpp.

2314 {
template<class Vector >
void test_ilAssignment3 ( )

Definition at line 2314 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, b, convertToInt(), i, and Ticker::TicksLeft.

2314 {
template<class Vector , typename T , typename Allocator >
void test_ilConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2294 of file StlVectorTest.cpp.

2294  {
2295  // whitebox: ensure that Vector(il) is implemented in terms of
2296  // Vector(il.begin(), il.end())
2297 
2298  // gcc fail
2299  if (Ticker::TicksLeft >= 0) {
2300  return;
2301  }
2302 
2303  Vector u = {1, 4, 7};
2304 
2305  ASSERT_TRUE(Allocator() == u.get_allocator());
2306  ASSERT_EQ(3, u.size()) << "u(il).size() fail";
2307  int i = 1;
2308  auto it = u.begin();
2309  for (; it != u.end(); ++it, i += 3) {
2310  ASSERT_EQ(i, convertToInt(*it)) << "u(il) constructed incorrectly";
2311  }
2312 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int TicksLeft
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_ilConstruction2 ( std::false_type  )

Definition at line 2294 of file StlVectorTest.cpp.

2294 {
template<class Vector >
void test_ilConstruction2 ( std::true_type  )

Definition at line 2294 of file StlVectorTest.cpp.

2294 {
template<class Vector >
void test_ilConstruction3 ( )

Definition at line 2294 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, and Ticker::TicksLeft.

2294 {
template<class Vector , typename T , typename Allocator >
void test_inputIteratorAllocConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, i,j,m, ticks))))  )

Definition at line 2166 of file StlVectorTest.cpp.

2166  {
2167 #ifdef USING_STD_VECTOR
2168  if (Ticker::TicksLeft >= 0)
2169  return;
2170 #endif
2171 
2172  auto ii = makeInputIterator(i);
2173  auto ij = makeInputIterator(j);
2174  const auto& cii = ii;
2175  const auto& cij = ij;
2176  const auto& cm = m;
2177 
2178  Vector u(cii, cij, cm);
2179 
2180  ASSERT_TRUE(m == u.get_allocator());
2181 }
static int TicksLeft
static map< string, int > m
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
Transformer< It, input_iterator_tag > makeInputIterator(const It &it)
template<class Vector >
void test_inputIteratorAllocConstruction2 ( std::false_type  )

Definition at line 2166 of file StlVectorTest.cpp.

2166 {
template<class Vector >
void test_inputIteratorAllocConstruction2 ( std::true_type  )

Definition at line 2166 of file StlVectorTest.cpp.

2166 {
template<class Vector >
void test_inputIteratorAllocConstruction3 ( )

Definition at line 2166 of file StlVectorTest.cpp.

References ASSERT_TRUE, i, m, makeInputIterator(), and Ticker::TicksLeft.

2166 {
template<class Vector , typename T , typename Allocator >
void test_inputIteratorConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, i,j, ticks))))  )

Definition at line 2274 of file StlVectorTest.cpp.

2274  {
2275 #ifdef USING_STD_VECTOR
2276  if (Ticker::TicksLeft >= 0)
2277  return;
2278 #endif
2279 
2280  auto ii = makeInputIterator(i);
2281  auto ij = makeInputIterator(j);
2282  const auto& cii = ii;
2283  const auto& cij = ij;
2284 
2285  Vector u(cii, cij);
2286 
2287  ASSERT_TRUE(Allocator() == u.get_allocator());
2288  ASSERT_EQ(j - i, u.size()) << "u(i,j).size() != j-i";
2289  for (auto it = u.begin(); it != u.end(); ++it, ++i) {
2290  ASSERT_EQ(*i, convertToInt(*it)) << "u(i,j) constructed incorrectly";
2291  }
2292 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int TicksLeft
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
Transformer< It, input_iterator_tag > makeInputIterator(const It &it)
template<class Vector >
void test_inputIteratorConstruction2 ( std::true_type  )

Definition at line 2274 of file StlVectorTest.cpp.

2274 {
template<class Vector >
void test_inputIteratorConstruction2 ( std::false_type  )

Definition at line 2274 of file StlVectorTest.cpp.

2274 {
template<class Vector >
void test_inputIteratorConstruction3 ( )

Definition at line 2274 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, makeInputIterator(), and Ticker::TicksLeft.

2274 {
template<class Vector , typename T , typename Allocator >
void test_iteratorEmplacement ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a,p, ticks))))  )

Definition at line 2366 of file StlVectorTest.cpp.

2366  {
2367  DataState<Vector> dsa(a);
2368  int idx = distance(a.begin(), p);
2369  auto am = a.get_allocator();
2370 
2371  auto q = a.emplace(p, 44);
2372 
2373  ASSERT_TRUE(am == a.get_allocator());
2374  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2375  insertNTCheck(a, dsa, idx, 1, 44);
2376 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void insertNTCheck(const Vector &a, DataState< Vector > &dsa, int idx, int n, int val)
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorEmplacement2 ( std::false_type  )

Definition at line 2366 of file StlVectorTest.cpp.

2366 {
template<class Vector >
void test_iteratorEmplacement2 ( std::true_type  )

Definition at line 2366 of file StlVectorTest.cpp.

2366 {
template<class Vector >
void test_iteratorEmplacement3 ( )

Definition at line 2366 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, insertNTCheck(), and STL_TEST.

2366 {
template<class Vector , typename T , typename Allocator >
void test_iteratorErase ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, p, ticks))))  )

Definition at line 2575 of file StlVectorTest.cpp.

2575  {
2576  if (p == a.end()) {
2577  return;
2578  }
2579 
2580  DataState<Vector> dsa(a);
2581  int idx = distance(a.begin(), p);
2582  auto am = a.get_allocator();
2583 
2584  auto rit = a.erase(p);
2585 
2586  ASSERT_TRUE(am == a.get_allocator());
2587  ASSERT_EQ(idx, distance(a.begin(), rit)) << "wrong iterator returned";
2588  eraseCheck(a, dsa, idx, 1);
2589 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void eraseCheck(Vector &a, DataState< Vector > &dsa, int idx, int n)
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorErase2 ( std::true_type  )

Definition at line 2575 of file StlVectorTest.cpp.

2575 {
template<class Vector >
void test_iteratorErase2 ( std::false_type  )

Definition at line 2575 of file StlVectorTest.cpp.

2575 {
template<class Vector >
void test_iteratorErase3 ( )

Definition at line 2575 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, eraseCheck(), and STL_TEST.

2575 {
template<class Vector , typename T , typename Allocator >
void test_iteratorEraseRange ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a,p,q, ticks))))  )

Definition at line 2597 of file StlVectorTest.cpp.

2597  {
2598  if (p == a.end()) {
2599  return;
2600  }
2601 
2602  DataState<Vector> dsa(a);
2603  int idx = distance(a.begin(), p);
2604  auto am = a.get_allocator();
2605 
2606  auto rit = a.erase(p, q);
2607 
2608  ASSERT_TRUE(am == a.get_allocator());
2609  ASSERT_EQ(idx, distance(a.begin(), rit)) << "wrong iterator returned";
2610  eraseCheck(a, dsa, idx, distance(p, q));
2611 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void eraseCheck(Vector &a, DataState< Vector > &dsa, int idx, int n)
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorEraseRange2 ( std::true_type  )

Definition at line 2597 of file StlVectorTest.cpp.

2597 {
template<class Vector >
void test_iteratorEraseRange2 ( std::false_type  )

Definition at line 2597 of file StlVectorTest.cpp.

2597 {
template<class Vector >
void test_iteratorEraseRange3 ( )

Definition at line 2597 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, and eraseCheck().

2597 {
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertIL ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, p, ticks))))  )

Definition at line 2532 of file StlVectorTest.cpp.

2532  {
2533  // gcc fail
2534  if (Ticker::TicksLeft >= 0) {
2535  return;
2536  }
2537 
2538  // whitebox: ensure that insert(p, il) is implemented in terms of
2539  // insert(p, il.begin(), il.end())
2540 
2541  DataState<Vector> dsa(a);
2542  int idx = distance(a.begin(), p);
2543  auto am = a.get_allocator();
2544 
2545 #ifndef USING_STD_VECTOR
2546  auto q =
2547 #endif
2548 
2549  a.insert(p, {1, 4, 7});
2550 
2551  ASSERT_TRUE(am == a.get_allocator());
2552 #ifndef USING_STD_VECTOR
2553  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2554 #endif
2555 
2556  int ila[] = {1, 4, 7};
2557  int* i = ila;
2558  int* j = ila + 3;
2559  insertItCheck(a, dsa, idx, i, j);
2560 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int TicksLeft
char a
void insertItCheck(const Vector &a, DataState< Vector > &dsa, int idx, int *b, int *e)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorInsertIL2 ( std::true_type  )

Definition at line 2532 of file StlVectorTest.cpp.

2532 {
template<class Vector >
void test_iteratorInsertIL2 ( std::false_type  )

Definition at line 2532 of file StlVectorTest.cpp.

2532 {
template<class Vector >
void test_iteratorInsertIL3 ( )

Definition at line 2532 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, i, insertItCheck(), and Ticker::TicksLeft.

2532 {
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertion ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a,p,t, ticks))))  )

Definition at line 2384 of file StlVectorTest.cpp.

2384  {
2385  DataState<Vector> dsa(a);
2386  int idx = distance(a.begin(), p);
2387  int tval = convertToInt(t);
2388  auto am = a.get_allocator();
2389  const auto& ct = t;
2390 
2391  auto q = a.insert(p, ct);
2392 
2393  ASSERT_TRUE(am == a.get_allocator());
2394  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2395  insertNTCheck(a, dsa, idx, 1, tval);
2396 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void insertNTCheck(const Vector &a, DataState< Vector > &dsa, int idx, int n, int val)
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorInsertion2 ( std::false_type  )

Definition at line 2384 of file StlVectorTest.cpp.

2384 {
template<class Vector >
void test_iteratorInsertion2 ( std::true_type  )

Definition at line 2384 of file StlVectorTest.cpp.

2384 {
template<class Vector >
void test_iteratorInsertion3 ( )
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionInputIterator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(6,(z, a,p,i,j, ticks))))  )

Definition at line 2508 of file StlVectorTest.cpp.

2508  {
2509  DataState<Vector> dsa(a);
2510  int idx = distance(a.begin(), p);
2511 
2512  auto ii = makeInputIterator(i);
2513  auto ij = makeInputIterator(j);
2514  auto am = a.get_allocator();
2515  const auto& cii = ii;
2516  const auto& cij = ij;
2517 
2518 #ifndef USING_STD_VECTOR
2519  auto q =
2520 #endif
2521 
2522  a.insert(p, cii, cij);
2523 
2524  ASSERT_TRUE(am == a.get_allocator());
2525 #ifndef USING_STD_VECTOR
2526  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2527 #endif
2528 
2529  insertItCheck(a, dsa, idx, i, j);
2530 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
void insertItCheck(const Vector &a, DataState< Vector > &dsa, int idx, int *b, int *e)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
Transformer< It, input_iterator_tag > makeInputIterator(const It &it)
template<class Vector >
void test_iteratorInsertionInputIterator2 ( std::true_type  )

Definition at line 2508 of file StlVectorTest.cpp.

2508 {
template<class Vector >
void test_iteratorInsertionInputIterator2 ( std::false_type  )

Definition at line 2508 of file StlVectorTest.cpp.

2508 {
template<class Vector >
void test_iteratorInsertionInputIterator3 ( )

Definition at line 2508 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, i, insertItCheck(), and makeInputIterator().

2508 {
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionIterator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(6,(z, a,p,i,j, ticks))))  )

Definition at line 2477 of file StlVectorTest.cpp.

2477  {
2478  DataState<Vector> dsa(a);
2479  int idx = distance(a.begin(), p);
2480 
2481  auto fi = makeForwardIterator(i);
2482  auto fj = makeForwardIterator(j);
2483  auto am = a.get_allocator();
2484  const auto& cfi = fi;
2485  const auto& cfj = fj;
2486 
2487 #ifndef USING_STD_VECTOR
2488  auto q =
2489 #endif
2490 
2491  a.insert(p, cfi, cfj);
2492 
2493  ASSERT_TRUE(am == a.get_allocator());
2494 #ifndef USING_STD_VECTOR
2495  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2496 #endif
2497 
2498  insertItCheck(a, dsa, idx, i, j);
2499 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
Transformer< It, forward_iterator_tag > makeForwardIterator(const It &it)
char a
void insertItCheck(const Vector &a, DataState< Vector > &dsa, int idx, int *b, int *e)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorInsertionIterator2 ( std::true_type  )

Definition at line 2477 of file StlVectorTest.cpp.

2477 {
template<class Vector >
void test_iteratorInsertionIterator2 ( std::false_type  )

Definition at line 2477 of file StlVectorTest.cpp.

2477 {
template<class Vector >
void test_iteratorInsertionIterator3 ( )

Definition at line 2477 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, i, insertItCheck(), makeForwardIterator(), and STL_TEST.

2477 {
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionN ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(6,(z, a,p,n,t, ticks))))  )

Definition at line 2429 of file StlVectorTest.cpp.

2429  {
2430  DataState<Vector> dsa(a);
2431  int idx = distance(a.begin(), p);
2432  int tval = convertToInt(t);
2433  auto am = a.get_allocator();
2434  const auto& ct = t;
2435 
2436 #ifndef USING_STD_VECTOR
2437  auto q =
2438 #endif
2439 
2440  a.insert(p, n, ct);
2441 
2442  ASSERT_TRUE(am == a.get_allocator());
2443 #ifndef USING_STD_VECTOR
2444  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2445 #endif
2446 
2447  insertNTCheck(a, dsa, idx, n, tval);
2448 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void insertNTCheck(const Vector &a, DataState< Vector > &dsa, int idx, int n, int val)
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorInsertionN2 ( std::true_type  )

Definition at line 2429 of file StlVectorTest.cpp.

2429 {
template<class Vector >
void test_iteratorInsertionN2 ( std::false_type  )

Definition at line 2429 of file StlVectorTest.cpp.

2429 {
template<class Vector >
void test_iteratorInsertionN3 ( )

Definition at line 2429 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), insertNTCheck(), and folly::pushmi::detail::t.

2429 {
template<class Vector , typename T , typename Allocator >
void test_iteratorInsertionRV ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a,p,t, ticks))))  )

Definition at line 2404 of file StlVectorTest.cpp.

2404  {
2405  // rvalue-references cannot have their address checked for aliased inserts
2406  if (a.data() <= addressof(t) && addressof(t) < a.data() + a.size()) {
2407  return;
2408  }
2409 
2410  DataState<Vector> dsa(a);
2411  int idx = distance(a.begin(), p);
2412  int tval = convertToInt(t);
2413  auto am = a.get_allocator();
2414 
2415  auto q = a.insert(p, std::move(t));
2416 
2417  ASSERT_TRUE(am == a.get_allocator());
2418  ASSERT_EQ(idx, distance(a.begin(), q)) << "incorrect iterator returned";
2419  insertNTCheck(a, dsa, idx, 1, tval);
2420 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void insertNTCheck(const Vector &a, DataState< Vector > &dsa, int idx, int n, int val)
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iteratorInsertionRV2 ( std::false_type  )

Definition at line 2404 of file StlVectorTest.cpp.

2404 {
template<class Vector >
void test_iteratorInsertionRV2 ( std::true_type  )

Definition at line 2404 of file StlVectorTest.cpp.

2404 {
template<class Vector >
void test_iteratorInsertionRV3 ( )
template<class Vector , typename T , typename Allocator >
void test_iterators ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 1823 of file StlVectorTest.cpp.

1823  {
1824  DataState<Vector> dsa(a);
1825  const auto& ca = a;
1826 
1827  auto itb = a.begin();
1828  auto citb = ca.begin();
1829  auto Citb = a.cbegin();
1830  auto ite = a.end();
1831  auto cite = ca.end();
1832  auto Cite = a.cend();
1833 
1835 
1836  ASSERT_TRUE(dsa == a) << "call to begin or end modified internal data";
1837 
1838  ASSERT_TRUE(citb == Citb) << "cv.begin != v.cbegin";
1839  ASSERT_TRUE(cite == Cite) << "cv.end != v.cend";
1840 
1841  if (ca.size() == 0) {
1842  ASSERT_TRUE(itb == ite) << "begin != end when empty";
1843  ASSERT_TRUE(Citb == Cite) << "cbegin != cend when empty";
1844  } else {
1845  ASSERT_TRUE(itb != ite) << "begin == end when non-empty";
1846  ASSERT_TRUE(Citb != Cite) << "cbegin == cend when non-empty";
1847  }
1848 
1849  auto dist = size_t(std::distance(itb, ite));
1850  auto Cdist = size_t(std::distance(Citb, Cite));
1851  ASSERT_TRUE(dist == ca.size()) << "distance(begin, end) != size";
1852  ASSERT_TRUE(Cdist == ca.size()) << "distance(cbegin, cend) != size";
1853 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
std::uniform_int_distribution< milliseconds::rep > dist
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_iterators2 ( std::false_type  )

Definition at line 1823 of file StlVectorTest.cpp.

1823 {
template<class Vector >
void test_iterators2 ( std::true_type  )

Definition at line 1823 of file StlVectorTest.cpp.

1823 {
template<class Vector >
void test_iterators3 ( )

Definition at line 1823 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, and dist.

1823 {
template<class Vector , typename T , typename Allocator >
void test_lengthError ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2923 of file StlVectorTest.cpp.

2923  {
2924  auto mx = Vector().max_size();
2925  auto big = mx + 1;
2926  if (mx >= big) {
2927  return; // max_size is the biggest size_type; overflowed
2928  }
2929 
2930  Vector u;
2931  try {
2932  u.reserve(big);
2933  FAIL() << "reserve(big) should have thrown an error";
2934  } catch (const std::length_error& e) {
2935  } catch (...) {
2936  FAIL() << "reserve(big) threw error other than length_error";
2937  }
2938 }
#define FAIL()
Definition: gtest.h:1822
template<class Vector >
void test_lengthError2 ( std::true_type  )

Definition at line 2923 of file StlVectorTest.cpp.

2923 {
template<class Vector >
void test_lengthError2 ( std::false_type  )

Definition at line 2923 of file StlVectorTest.cpp.

2923 {
template<class Vector >
void test_lengthError3 ( )

Definition at line 2923 of file StlVectorTest.cpp.

References FAIL.

2923 {
template<class Vector , typename T , typename Allocator >
void test_memberSwappable ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks))))  )

Definition at line 1870 of file StlVectorTest.cpp.

1870  {
1872  convertToInt(a.get_allocator()) != convertToInt(b.get_allocator())) {
1873  // undefined behaviour
1874  return;
1875  }
1876 
1877  DataState<Vector> dsa(a);
1878  DataState<Vector> dsb(b);
1879  auto adata = a.data();
1880  auto bdata = b.data();
1881  auto am = a.get_allocator();
1882  auto bm = b.get_allocator();
1883 
1884  try {
1885  a.swap(b);
1886  } catch (...) {
1887  FAIL() << "swap is noexcept";
1888  }
1889 
1891  ASSERT_TRUE(bm == a.get_allocator());
1892  ASSERT_TRUE(am == b.get_allocator());
1893  } else {
1894  ASSERT_TRUE(am == a.get_allocator());
1895  ASSERT_TRUE(bm == b.get_allocator());
1896  }
1898 
1899  ASSERT_TRUE(adata == b.data() && bdata == a.data());
1900  ASSERT_TRUE(dsa == b && dsb == a) << "swap did not swap";
1901 }
#define FAIL()
Definition: gtest.h:1822
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char b
static int CountTotalOps
char a
static const char *const value
Definition: Conv.cpp:50
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_memberSwappable2 ( std::false_type  )

Definition at line 1870 of file StlVectorTest.cpp.

1870 {
template<class Vector >
void test_memberSwappable2 ( std::true_type  )

Definition at line 1870 of file StlVectorTest.cpp.

1870 {
template<class Vector >
void test_memberSwappable3 ( )

Definition at line 1870 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, b, convertToInt(), Counter::CountTotalOps, FAIL, and value.

1870 {
template<class Vector , typename T , typename Allocator >
void test_moveAssignment ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks))))  )

Definition at line 1801 of file StlVectorTest.cpp.

1801  {
1802  DataState<Vector> dsb(b);
1803  auto am = a.get_allocator();
1804  auto bm = b.get_allocator();
1805 
1806  Vector& ret = a = std::move(b);
1807 
1808  if (std::allocator_traits<
1810  ASSERT_TRUE(bm == a.get_allocator());
1811  } else {
1812  ASSERT_TRUE(am == a.get_allocator());
1813  }
1814  ASSERT_TRUE(&ret == &a);
1815  ASSERT_TRUE(&a == &b || dsb == a) << "move assignment did not create a copy";
1816  // The source of the move may be left in any (albeit valid) state.
1817 }
char b
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
char a
static const char *const value
Definition: Conv.cpp:50
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_moveAssignment2 ( std::true_type  )

Definition at line 1801 of file StlVectorTest.cpp.

1801 {
template<class Vector >
void test_moveAssignment2 ( std::false_type  )

Definition at line 1801 of file StlVectorTest.cpp.

1801 {
template<class Vector >
void test_moveAssignment3 ( )

Definition at line 1801 of file StlVectorTest.cpp.

References a, ASSERT_TRUE, b, folly::gen::move, and value.

1801 {
template<class Vector , typename T , typename Allocator >
void test_moveConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 1785 of file StlVectorTest.cpp.

1785  {
1786  DataState<Vector> dsa(a);
1787  auto m = a.get_allocator();
1788 
1789  Vector u(move(a));
1790 
1791  ASSERT_TRUE(m == u.get_allocator());
1793 
1794  ASSERT_TRUE(dsa == u);
1795 
1796  if (false) {
1797  Vector u2 = move(a);
1798  }
1799 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
static int CountTotalOps
static map< string, int > m
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_moveConstruction2 ( std::false_type  )

Definition at line 1785 of file StlVectorTest.cpp.

1785 {
template<class Vector >
void test_moveConstruction2 ( std::true_type  )

Definition at line 1785 of file StlVectorTest.cpp.

1785 {
template<class Vector >
void test_moveConstruction3 ( )

Definition at line 1785 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, m, and folly::gen::move.

1785 {
template<class Vector , typename T , typename Allocator >
void test_moveConstructionWithAllocator ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2090 of file StlVectorTest.cpp.

2090  {
2091  (void)a;
2092  // there is nothing new to test here
2093 }
char a
template<class Vector >
void test_moveConstructionWithAllocator2 ( std::false_type  )

Definition at line 2090 of file StlVectorTest.cpp.

2090 {
template<class Vector >
void test_moveConstructionWithAllocator2 ( std::true_type  )

Definition at line 2090 of file StlVectorTest.cpp.

2090 {
template<class Vector >
void test_moveConstructionWithAllocator3 ( )

Definition at line 2090 of file StlVectorTest.cpp.

References a, and STL_TEST.

2090 {
template<class Vector , typename T , typename Allocator >
void test_moveConstructionWithAllocatorSupplied ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a,m, ticks))))  )

Definition at line 2100 of file StlVectorTest.cpp.

2100  {
2101  bool deep = m != a.get_allocator();
2102  auto osize = a.size();
2103  auto oalloc = AllocTracker::Constructed;
2104  const auto& cm = m;
2105 
2106  Vector u(std::move(a), cm);
2107 
2108  ASSERT_TRUE(u.get_allocator() == m);
2109 
2110  if (deep) {
2111  if (!AllocTracker::Allocated.empty()) {
2112  ASSERT_EQ(osize, AllocTracker::Constructed - oalloc);
2113  }
2114  } else {
2116  }
2117 }
static map< void *, size_t > Allocated
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
static int CountTotalOps
constexpr auto empty(C const &c) -> decltype(c.empty())
Definition: Access.h:55
static map< string, int > m
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
static int Constructed
template<class Vector >
void test_moveConstructionWithAllocatorSupplied2 ( std::false_type  )

Definition at line 2100 of file StlVectorTest.cpp.

2100 {
template<class Vector >
void test_moveConstructionWithAllocatorSupplied2 ( std::true_type  )

Definition at line 2100 of file StlVectorTest.cpp.

2100 {
template<class Vector >
void test_moveConstructionWithAllocatorSupplied3 ( )
template<class Vector , typename T , typename Allocator >
void test_moveIterators ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 2876 of file StlVectorTest.cpp.

2876  {
2877  if (false) {
2878  int* i = nullptr;
2879  int* j = nullptr;
2880 
2881  auto mfi = make_move_iterator(makeForwardIterator(i));
2882  auto mfj = make_move_iterator(makeForwardIterator(j));
2883  auto mii = make_move_iterator(makeInputIterator(i));
2884  auto mij = make_move_iterator(makeInputIterator(j));
2885 
2886  Vector u1(mfi, mfj);
2887  Vector u2(mii, mij);
2888 
2889  u1.insert(u1.begin(), mfi, mfj);
2890  u1.insert(u1.begin(), mii, mij);
2891 
2892  u1.assign(mfi, mfj);
2893  u1.assign(mii, mij);
2894  }
2895 }
Transformer< It, forward_iterator_tag > makeForwardIterator(const It &it)
Transformer< It, input_iterator_tag > makeInputIterator(const It &it)
template<class Vector >
void test_moveIterators2 ( std::false_type  )

Definition at line 2876 of file StlVectorTest.cpp.

2876 {
template<class Vector >
void test_moveIterators2 ( std::true_type  )

Definition at line 2876 of file StlVectorTest.cpp.

2876 {
template<class Vector >
void test_moveIterators3 ( )

Definition at line 2876 of file StlVectorTest.cpp.

References i, makeForwardIterator(), and makeInputIterator().

2876 {
template<class Vector , typename T , typename Allocator >
void test_nAllocConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, n, m, ticks))))  )

Definition at line 2123 of file StlVectorTest.cpp.

2123  {
2124 #ifndef USING_STD_VECTOR
2125  const auto& cm = m;
2126 
2127  Vector u(n, cm);
2128 
2129  ASSERT_TRUE(m == u.get_allocator());
2130 #endif
2131 }
static map< string, int > m
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_nAllocConstruction2 ( std::false_type  )

Definition at line 2123 of file StlVectorTest.cpp.

2123 {
template<class Vector >
void test_nAllocConstruction2 ( std::true_type  )

Definition at line 2123 of file StlVectorTest.cpp.

2123 {
template<class Vector >
void test_nAllocConstruction3 ( )

Definition at line 2123 of file StlVectorTest.cpp.

References ASSERT_TRUE, and m.

2123 {
template<class Vector , typename T , typename Allocator >
void test_nConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, n, ticks))))  )

Definition at line 2223 of file StlVectorTest.cpp.

2223  {
2224  Vector u(n);
2225 
2226  ASSERT_TRUE(Allocator() == u.get_allocator());
2227  ASSERT_EQ(n, u.size());
2229 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
static int CountDC
template<class Vector >
void test_nConstruction2 ( std::true_type  )

Definition at line 2223 of file StlVectorTest.cpp.

2223 {
template<class Vector >
void test_nConstruction2 ( std::false_type  )

Definition at line 2223 of file StlVectorTest.cpp.

2223 {
template<class Vector >
void test_nConstruction3 ( )

Definition at line 2223 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_TRUE, Counter::CountDC, and Counter::CountTotalOps.

2223 {
template<class Vector , typename T , typename Allocator >
void test_nCopyAllocConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, n, t, m, ticks))))  )

Definition at line 2133 of file StlVectorTest.cpp.

2133  {
2134  const auto& cm = m;
2135  const auto& ct = t;
2136 
2137  Vector u(n, ct, cm);
2138 
2139  ASSERT_TRUE(m == u.get_allocator());
2140 }
static map< string, int > m
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_nCopyAllocConstruction2 ( std::false_type  )

Definition at line 2133 of file StlVectorTest.cpp.

2133 {
template<class Vector >
void test_nCopyAllocConstruction2 ( std::true_type  )

Definition at line 2133 of file StlVectorTest.cpp.

2133 {
template<class Vector >
void test_nCopyAllocConstruction3 ( )

Definition at line 2133 of file StlVectorTest.cpp.

References ASSERT_TRUE, i, m, STL_TEST, and folly::pushmi::detail::t.

2133 {
template<class Vector , typename T , typename Allocator >
void test_nCopyConstruction ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, n, t, ticks))))  )

Definition at line 2231 of file StlVectorTest.cpp.

2231  {
2232  const auto& ct = t;
2233 
2234  Vector u(n, ct);
2235 
2236  ASSERT_TRUE(Allocator() == u.get_allocator());
2237  ASSERT_EQ(n, u.size()) << "Vector(n, t).size() != n" << endl;
2238  for (const auto& val : u) {
2240  << "not all elements of Vector(n, t) are equal to t";
2241  }
2242 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
double val
Definition: String.cpp:273
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_nCopyConstruction2 ( std::true_type  )

Definition at line 2231 of file StlVectorTest.cpp.

2231 {
template<class Vector >
void test_nCopyConstruction2 ( std::false_type  )

Definition at line 2231 of file StlVectorTest.cpp.

2231 {
template<class Vector >
void test_nCopyConstruction3 ( )

Definition at line 2231 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, STL_TEST, folly::pushmi::detail::t, and val.

2231 {
template<class Vector , typename T , typename Allocator >
void test_nonmemberSwappable ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, b, ticks))))  )

Definition at line 1903 of file StlVectorTest.cpp.

1903  {
1905  convertToInt(a.get_allocator()) != convertToInt(b.get_allocator())) {
1906  // undefined behaviour
1907  return;
1908  }
1909 
1910  DataState<Vector> dsa(a);
1911  DataState<Vector> dsb(b);
1912  auto adata = a.data();
1913  auto bdata = b.data();
1914  auto am = a.get_allocator();
1915  auto bm = b.get_allocator();
1916 
1917  try {
1918  swap(a, b);
1919  } catch (...) {
1920  FAIL() << "swap is noexcept";
1921  }
1922 
1924  ASSERT_TRUE(bm == a.get_allocator());
1925  ASSERT_TRUE(am == b.get_allocator());
1926  } else {
1927  ASSERT_TRUE(am == a.get_allocator());
1928  ASSERT_TRUE(bm == b.get_allocator());
1929  }
1931 
1932  ASSERT_TRUE(adata == b.data() && bdata == a.data());
1933  ASSERT_TRUE(dsa == b && dsb == a) << "swap did not swap";
1934 }
#define FAIL()
Definition: gtest.h:1822
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char b
static int CountTotalOps
char a
static const char *const value
Definition: Conv.cpp:50
int convertToInt(int t)
void swap(SwapTrackingAlloc< T > &, SwapTrackingAlloc< T > &)
Definition: F14TestUtil.h:414
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_nonmemberSwappable2 ( std::false_type  )

Definition at line 1903 of file StlVectorTest.cpp.

1903 {
template<class Vector >
void test_nonmemberSwappable2 ( std::true_type  )

Definition at line 1903 of file StlVectorTest.cpp.

1903 {
template<class Vector >
void test_nonmemberSwappable3 ( )
template<class Vector , typename T , typename Allocator >
void test_operatorBrace ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2842 of file StlVectorTest.cpp.

2842  {
2843  const auto& ca = a;
2844  for (size_t i = 0; i < ca.size(); ++i) {
2845  ASSERT_TRUE(addressof(ca[i]) == ca.data() + i);
2846  }
2847 
2849 
2850  if (false) {
2851  mutate(a[0]);
2852  }
2853 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
char a
void mutate(int &i)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_operatorBrace2 ( std::true_type  )

Definition at line 2842 of file StlVectorTest.cpp.

2842 {
template<class Vector >
void test_operatorBrace2 ( std::false_type  )

Definition at line 2842 of file StlVectorTest.cpp.

2842 {
template<class Vector >
void test_operatorBrace3 ( )

Definition at line 2842 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, i, and mutate().

2842 {
template<class Vector , typename T , typename Allocator >
void test_popBack ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2823 of file StlVectorTest.cpp.

2823  {
2824  if (a.empty()) {
2825  return;
2826  }
2827 
2828  DataState<Vector> dsa(a);
2829  auto am = a.get_allocator();
2830 
2831  a.pop_back();
2832 
2833  ASSERT_TRUE(am == a.get_allocator());
2834  ASSERT_EQ(dsa.size() - 1, a.size());
2835  size_t i = 0;
2836  auto it = a.begin();
2837  for (; it != a.end(); ++it, ++i) {
2838  ASSERT_EQ(dsa[i], convertToInt(*it));
2839  }
2840 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_popBack2 ( std::true_type  )

Definition at line 2823 of file StlVectorTest.cpp.

2823 {
template<class Vector >
void test_popBack2 ( std::false_type  )

Definition at line 2823 of file StlVectorTest.cpp.

2823 {
template<class Vector >
void test_popBack3 ( )

Definition at line 2823 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, and DataState< Vector >::size().

2823 {
template<class Vector , typename T , typename Allocator >
void test_populate ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 1729 of file StlVectorTest.cpp.

1729  {
1730  // We use emplace_back to construct vectors for testing, as well as size,
1731  // data, and capacity. We make sure these work before proceeding with tests.
1732 
1733  Vector u;
1734  ASSERT_EQ(0, u.size());
1735  ASSERT_EQ(nullptr, u.data());
1736 
1737  u.emplace_back(17);
1738  ASSERT_EQ(1, u.size());
1739  ASSERT_LT(u.capacity(), 100)
1740  << "single push_back increased capacity to " << u.capacity();
1741  ASSERT_NE(nullptr, u.data());
1742  ASSERT_EQ(17, convertToInt(u.data()[0]))
1743  << "first object did not get emplaced correctly";
1744 
1745  for (int i = 0; i < 3; ++i) {
1746  auto cap = u.capacity();
1747  while (u.size() < cap) {
1748  u.emplace_back(22);
1749  ASSERT_EQ(cap, u.capacity()) << "Vector grew when it did not need to";
1750  ASSERT_EQ(22, convertToInt(u.data()[u.size() - 1]))
1751  << "push_back with excess capacity failed";
1752  }
1753 
1754  ASSERT_EQ(cap, u.size());
1755 
1756  u.emplace_back(4);
1757  ASSERT_GT(u.capacity(), cap) << "capacity did not grow on overflow";
1758  ASSERT_EQ(cap + 1, u.size());
1759  ASSERT_EQ(4, convertToInt(u.data()[u.size() - 1]))
1760  << "grow object did not get emplaced correctly";
1761  }
1762 }
#define ASSERT_GT(val1, val2)
Definition: gtest.h:1976
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
#define ASSERT_LT(val1, val2)
Definition: gtest.h:1968
int convertToInt(int t)
#define ASSERT_NE(val1, val2)
Definition: gtest.h:1960
template<class Vector >
void test_populate2 ( std::true_type  )

Definition at line 1729 of file StlVectorTest.cpp.

1729 {
template<class Vector >
void test_populate2 ( std::false_type  )

Definition at line 1729 of file StlVectorTest.cpp.

1729 {
template<class Vector >
void test_populate3 ( )

Definition at line 1729 of file StlVectorTest.cpp.

References ASSERT_EQ, ASSERT_GT, ASSERT_LT, ASSERT_NE, convertToInt(), and i.

1729 {
template<class Vector , typename T , typename Allocator >
void test_pushBack ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, t, ticks))))  )

Definition at line 2768 of file StlVectorTest.cpp.

2768  {
2769  DataState<Vector> dsa(a);
2770  int tval = convertToInt(t);
2771  auto adata = a.data();
2772  int excess = a.capacity() - a.size();
2773  auto am = a.get_allocator();
2774  const auto& ct = t;
2775 
2776  try {
2777  a.push_back(ct);
2778  } catch (...) {
2779  ASSERT_TRUE(dsa == a) << "failed strong exception guarantee";
2780  throw;
2781  }
2782 
2783  ASSERT_TRUE(am == a.get_allocator());
2784  if (excess > 0) {
2785  ASSERT_TRUE(a.data() == adata) << "unnecessary relocation";
2786  }
2787  ASSERT_EQ(dsa.size() + 1, a.size());
2788  size_t i = 0;
2789  auto it = a.begin();
2790  for (; i < dsa.size(); ++i, ++it) {
2791  ASSERT_EQ(dsa[i], convertToInt(*it));
2792  }
2793  ASSERT_EQ(tval, convertToInt(a.back()));
2794 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_pushBack2 ( std::false_type  )

Definition at line 2768 of file StlVectorTest.cpp.

2768 {
template<class Vector >
void test_pushBack2 ( std::true_type  )

Definition at line 2768 of file StlVectorTest.cpp.

2768 {
template<class Vector >
void test_pushBack3 ( )
template<class Vector , typename T , typename Allocator >
void test_pushBackRV ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, t, ticks))))  )

Definition at line 2796 of file StlVectorTest.cpp.

2796  {
2797  DataState<Vector> dsa(a);
2798  int tval = convertToInt(t);
2799  auto adata = a.data();
2800  int excess = a.capacity() - a.size();
2801  auto am = a.get_allocator();
2802 
2803  try {
2804  a.push_back(move(t));
2805  } catch (...) {
2806  ASSERT_TRUE(dsa == a) << "failed strong exception guarantee";
2807  throw;
2808  }
2809 
2810  ASSERT_TRUE(am == a.get_allocator());
2811  if (excess > 0) {
2812  ASSERT_TRUE(a.data() == adata) << "unnecessary relocation";
2813  }
2814  ASSERT_EQ(dsa.size() + 1, a.size());
2815  size_t i = 0;
2816  auto it = a.begin();
2817  for (; i < dsa.size(); ++i, ++it) {
2818  ASSERT_EQ(dsa[i], convertToInt(*it));
2819  }
2820  ASSERT_EQ(tval, convertToInt(a.back()));
2821 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_pushBackRV2 ( std::true_type  )

Definition at line 2796 of file StlVectorTest.cpp.

2796 {
template<class Vector >
void test_pushBackRV2 ( std::false_type  )

Definition at line 2796 of file StlVectorTest.cpp.

2796 {
template<class Vector >
void test_pushBackRV3 ( )
template<class Vector , typename T , typename Allocator >
void test_relinquish ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 3027 of file StlVectorTest.cpp.

3027  {
3028  auto sz = a.size();
3029  auto cap = a.capacity();
3030  auto data = a.data();
3031 
3032  auto guts = relinquish(a);
3033 
3034  ASSERT_EQ(data, guts);
3035  ASSERT_TRUE(a.empty());
3036  ASSERT_EQ(0, a.capacity());
3037 
3038  auto alloc = a.get_allocator();
3039  for (size_t i = 0; i < sz; ++i) {
3041  }
3042  if (guts != nullptr) {
3043  if (std::is_same<
3044  decltype(alloc),
3045  std::allocator<typename decltype(alloc)::value_type>>::value) {
3046  free(guts);
3047  } else {
3048  std::allocator_traits<decltype(alloc)>::deallocate(alloc, guts, cap);
3049  }
3050  }
3051 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
T * relinquish(fbvector< T, A > &v)
Definition: FBVector.h:1744
static void destroy()
char a
static const char *const value
Definition: Conv.cpp:50
void free()
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
template<class Vector >
void test_relinquish2 ( std::true_type  )

Definition at line 3027 of file StlVectorTest.cpp.

3027 {
template<class Vector >
void test_relinquish2 ( std::false_type  )

Definition at line 3027 of file StlVectorTest.cpp.

3027 {
template<class Vector >
void test_relinquish3 ( )

Definition at line 3027 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, data, destroy(), bm::free(), i, folly::relinquish(), and value.

3027 {
template<class Vector , typename T , typename Allocator >
void test_reserve ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, n, ticks))))  )

Definition at line 2906 of file StlVectorTest.cpp.

2906  {
2907  auto adata = a.data();
2908  auto ocap = a.capacity();
2909  auto am = a.get_allocator();
2910 
2911  a.reserve(n);
2912 
2913  ASSERT_TRUE(am == a.get_allocator());
2914  if (size_t(n) <= ocap) {
2916  ASSERT_TRUE(adata == a.data());
2917  } else {
2918  ASSERT_TRUE(a.capacity() >= size_t(n));
2919  ASSERT_LE(Counter::CountTotalOps, 2 * a.size()); // move and delete
2920  }
2921 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
#define ASSERT_LE(val1, val2)
Definition: gtest.h:1964
static int CountTotalOps
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_reserve2 ( std::true_type  )

Definition at line 2906 of file StlVectorTest.cpp.

2906 {
template<class Vector >
void test_reserve2 ( std::false_type  )

Definition at line 2906 of file StlVectorTest.cpp.

2906 {
template<class Vector >
void test_reserve3 ( )

Definition at line 2906 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_LE, ASSERT_TRUE, and Counter::CountTotalOps.

2906 {
template<class Vector , typename T , typename Allocator >
void test_resize ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(4,(z, a, n, ticks))))  )

Definition at line 2940 of file StlVectorTest.cpp.

2940  {
2941  DataState<Vector> dsa(a);
2942  int sz = a.size();
2943  auto am = a.get_allocator();
2944 
2945  a.resize(n);
2946 
2947  ASSERT_TRUE(am == a.get_allocator());
2948  ASSERT_EQ(n, a.size());
2949 
2950  if (n <= sz) {
2951  for (int i = 0; i < n; ++i) {
2952  ASSERT_EQ(dsa[i], convertToInt(a[i]));
2953  }
2954  } else {
2955  for (int i = 0; i < sz; ++i) {
2956  ASSERT_EQ(dsa[i], convertToInt(a[i]));
2957  }
2958  }
2959 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_resize2 ( std::true_type  )

Definition at line 2940 of file StlVectorTest.cpp.

2940 {
template<class Vector >
void test_resize2 ( std::false_type  )

Definition at line 2940 of file StlVectorTest.cpp.

2940 {
template<class Vector >
void test_resize3 ( )

Definition at line 2940 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), and i.

2940 {
template<class Vector , typename T , typename Allocator >
void test_resizeT ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(5,(z, a, n, t, ticks))))  )

Definition at line 2961 of file StlVectorTest.cpp.

2961  {
2962 #ifdef USING_STD_VECTOR
2963  if (a.data() <= addressof(t) && addressof(t) < a.data() + a.size())
2964  return;
2965 #endif
2966 
2967  DataState<Vector> dsa(a);
2968  int sz = a.size();
2969  auto am = a.get_allocator();
2970  const auto& ct = t;
2971  int val = convertToInt(t);
2972 
2973  a.resize(n, ct);
2974 
2975  ASSERT_TRUE(am == a.get_allocator());
2976  ASSERT_EQ(n, a.size());
2977 
2978  if (n <= sz) {
2979  for (int i = 0; i < n; ++i) {
2980  ASSERT_EQ(dsa[i], convertToInt(a[i]));
2981  }
2982  } else {
2983  int i = 0;
2984  for (; i < sz; ++i) {
2985  ASSERT_EQ(dsa[i], convertToInt(a[i]));
2986  }
2987  for (; i < n; ++i) {
2988  ASSERT_EQ(val, convertToInt(a[i]));
2989  }
2990  }
2991 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
double val
Definition: String.cpp:273
char a
int convertToInt(int t)
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_resizeT2 ( std::true_type  )

Definition at line 2961 of file StlVectorTest.cpp.

2961 {
template<class Vector >
void test_resizeT2 ( std::false_type  )

Definition at line 2961 of file StlVectorTest.cpp.

2961 {
template<class Vector >
void test_resizeT3 ( )

Definition at line 2961 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, convertToInt(), i, folly::pushmi::detail::t, and val.

2961 {
template<class Vector , typename T , typename Allocator >
void test_reversibleContainerTypedefs ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 1978 of file StlVectorTest.cpp.

1978  {
1979  static_assert(
1980  is_same<
1981  typename Vector::reverse_iterator,
1982  std::reverse_iterator<typename Vector::iterator>>::value,
1983  "Vector::reverse_iterator != reverse_iterator<Vector:iterator");
1984  static_assert(
1985  is_same<
1986  typename Vector::const_reverse_iterator,
1987  std::reverse_iterator<typename Vector::const_iterator>>::value,
1988  "Vector::const_reverse_iterator != "
1989  "const_reverse_iterator<Vector::iterator");
1990 }
static const char *const value
Definition: Conv.cpp:50
template<class Vector >
void test_reversibleContainerTypedefs2 ( std::true_type  )

Definition at line 1978 of file StlVectorTest.cpp.

1978 {
template<class Vector >
void test_reversibleContainerTypedefs2 ( std::false_type  )

Definition at line 1978 of file StlVectorTest.cpp.

1978 {
template<class Vector >
void test_reversibleContainerTypedefs3 ( )

Definition at line 1978 of file StlVectorTest.cpp.

References value.

1978 {
template<class Vector , typename T , typename Allocator >
void test_reversibleIterators ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 1992 of file StlVectorTest.cpp.

1992  {
1993  const auto& ca = a;
1994  DataState<Vector> ds(a);
1995 
1996  auto ritb = a.rbegin();
1997  auto critb = ca.rbegin();
1998  auto Critb = a.crbegin();
1999  auto rite = a.rend();
2000  auto crite = ca.rend();
2001  auto Crite = a.crend();
2002 
2004 
2005  ASSERT_TRUE(ds == a) << "call to rbegin or rend modified internal data";
2006 
2007  ASSERT_TRUE(critb == Critb) << "cv.rbegin != v.crbegin";
2008  ASSERT_TRUE(crite == Crite) << "cv.rend != v.crend";
2009 
2010  if (ca.size() == 0) {
2011  ASSERT_TRUE(ritb == rite) << "rbegin != rend when empty";
2012  ASSERT_TRUE(Critb == Crite) << "crbegin != crend when empty";
2013  } else {
2014  ASSERT_TRUE(ritb != rite) << "rbegin == rend when non-empty";
2015  ASSERT_TRUE(Critb != Crite) << "crbegin == crend when non-empty";
2016  }
2017 
2018  auto dist = size_t(std::distance(ritb, rite));
2019  auto Cdist = size_t(std::distance(Critb, Crite));
2020  ASSERT_TRUE(dist == ca.size()) << "distance(rbegin, rend) != size";
2021  ASSERT_TRUE(Cdist == ca.size()) << "distance(crbegin, crend) != size";
2022 }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int CountTotalOps
std::uniform_int_distribution< milliseconds::rep > dist
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_reversibleIterators2 ( std::false_type  )

Definition at line 1992 of file StlVectorTest.cpp.

1992 {
template<class Vector >
void test_reversibleIterators2 ( std::true_type  )

Definition at line 1992 of file StlVectorTest.cpp.

1992 {
template<class Vector >
void test_reversibleIterators3 ( )

Definition at line 1992 of file StlVectorTest.cpp.

References a, ASSERT_EQ, ASSERT_TRUE, Counter::CountTotalOps, and dist.

1992 {
template<class Vector , typename T , typename Allocator >
void test_shrinkToFit ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z, a, ticks))))  )

Definition at line 2993 of file StlVectorTest.cpp.

2993  {
2994  bool willThrow = Ticker::TicksLeft >= 0;
2995 
2996  a.reserve(a.capacity() * 11);
2997 
2998  auto ocap = a.capacity();
2999  DataState<Vector> dsa(a);
3000 
3001  auto am = a.get_allocator();
3002 
3003  try {
3004  a.shrink_to_fit();
3005  } catch (...) {
3006  FAIL() << "shrink_to_fit should swallow errors";
3007  }
3008 
3009  ASSERT_TRUE(am == a.get_allocator());
3010  ASSERT_TRUE(dsa == a);
3011  if (willThrow) {
3012  // ASSERT_EQ(ocap, a.capacity()); might shrink in place
3013  throw TickException("I swallowed the error");
3014  } else {
3015  ASSERT_TRUE(a.capacity() == 0 || a.capacity() < ocap) << "Look into this";
3016  }
3017 }
#define FAIL()
Definition: gtest.h:1822
static int TicksLeft
char a
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
template<class Vector >
void test_shrinkToFit2 ( std::true_type  )

Definition at line 2993 of file StlVectorTest.cpp.

2993 {
template<class Vector >
void test_shrinkToFit2 ( std::false_type  )

Definition at line 2993 of file StlVectorTest.cpp.

2993 {
template<class Vector >
void test_shrinkToFit3 ( )

Definition at line 2993 of file StlVectorTest.cpp.

References a, ASSERT_TRUE, FAIL, and Ticker::TicksLeft.

2993 {
template<class Vector , typename T , typename Allocator >
void test_sizeops ( BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TRANSFORM(ARGIFY, _, BOOST_PP_TUPLE_TO_SEQ(3,(z,, ticks))))  )

Definition at line 1971 of file StlVectorTest.cpp.

1971  {
1972  // This check generators check this clause already.
1973 }
template<class Vector >
void test_sizeops2 ( std::true_type  )

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
template<class Vector >
void test_sizeops2 ( std::false_type  )

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
template<class Vector >
void test_sizeops3 ( )

Definition at line 1971 of file StlVectorTest.cpp.

1971 {
template<class Vector >
void verify ( int  extras)
template<class Vector >
void verify ( int  extras,
const Vector &  v 
)

Definition at line 1488 of file StlVectorTest.cpp.

References ASSERT_EQ, getTotal(), testing::Test::HasFatalFailure(), isSane(), value, verifyAllocator(), and verifyVector().

1488  {
1489  verifyVector(v);
1491  ASSERT_EQ(v.size() + extras, getTotal())
1492  << "not all Data are in the vector";
1493  }
1494  isSane();
1496  return;
1497  }
1499  verifyAllocator(v.size(), v.capacity());
1500  }
1501 }
static bool HasFatalFailure()
Definition: gtest.cc:2487
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void verifyAllocator(int ele, int cap)
int getTotal()
void verifyVector(const Vector &v)
static const char *const value
Definition: Conv.cpp:50
void isSane()
template<class Vector >
void verify ( int  extras,
const Vector &  v1,
const Vector &  v2 
)

Definition at line 1503 of file StlVectorTest.cpp.

References ASSERT_EQ, getTotal(), testing::Test::HasFatalFailure(), isSane(), folly::size(), value, verifyAllocator(), and verifyVector().

1503  {
1504  verifyVector(v1);
1505  verifyVector(v2);
1506  auto size = v1.size();
1507  auto cap = v1.capacity();
1508  if (&v1 != &v2) {
1509  size += v2.size();
1510  cap += v2.capacity();
1511  }
1513  ASSERT_EQ(size + extras, getTotal()) << "not all Data are in the vector(s)";
1514  }
1515  isSane();
1517  return;
1518  }
1520  verifyAllocator(size, cap);
1521  }
1522 }
static bool HasFatalFailure()
Definition: gtest.cc:2487
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
void verifyAllocator(int ele, int cap)
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
int getTotal()
void verifyVector(const Vector &v)
static const char *const value
Definition: Conv.cpp:50
void isSane()
void verifyAllocator ( int  ele,
int  cap 
)

Definition at line 1458 of file StlVectorTest.cpp.

References ASSERT_EQ, AllocTracker::Constructed, and AllocTracker::Destroyed.

Referenced by verify().

1458  {
1460 
1461  int tot = 0;
1462  for (auto kv : AllocTracker::Allocated) {
1463  if (kv.second != size_t(-1)) {
1464  tot += kv.second;
1465  }
1466  }
1467  ASSERT_EQ(cap, tot) << "the allocator counts " << tot
1468  << " space, "
1469  "but the vector(s) have (combined) capacity "
1470  << cap;
1471 }
static map< void *, size_t > Allocated
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
static int Destroyed
static int Constructed
template<class Vector >
void verifyVector ( const Vector &  v)

Definition at line 1446 of file StlVectorTest.cpp.

References ASSERT_TRUE.

Referenced by verify().

1446  {
1447  ASSERT_TRUE(v.begin() <= v.end()) << "end is before begin";
1448  ASSERT_TRUE(v.empty() == (v.begin() == v.end())) << "empty != (begin == end)";
1449  ASSERT_TRUE(v.size() == size_t(distance(v.begin(), v.end())))
1450  << "size != end - begin";
1451  ASSERT_TRUE(v.size() <= v.capacity()) << "size > capacity";
1452  ASSERT_TRUE(v.capacity() <= v.max_size()) << "capacity > max_size";
1453  ASSERT_TRUE(v.data() || true); // message won't print - it will just crash
1454  ASSERT_TRUE(v.size() == 0 || v.data() != nullptr)
1455  << "nullptr data points to at least one element";
1456 }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865

Variable Documentation

int ijarC[12] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89}
static

Definition at line 1321 of file StlVectorTest.cpp.

int ijarr[12] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89}
static

Definition at line 1320 of file StlVectorTest.cpp.

const vector<int> nSizes = {0, 1, 2, 9, 10, 11}
static

Definition at line 1307 of file StlVectorTest.cpp.

int populateIndex = 1426

Definition at line 1236 of file StlVectorTest.cpp.

Referenced by populate().

const vector<int> tVals = {0, 1, 2, 3, 17, 66, 521}
static

Definition at line 1408 of file StlVectorTest.cpp.

const vector<pair<int, int> > VectorSizes
static

Definition at line 1202 of file StlVectorTest.cpp.