27#ifndef RW_23_CONTAINERS_H_INCLUDED
28#define RW_23_CONTAINERS_H_INCLUDED
243 typedef _RWSTD_SIZE_T SizeType;
282 : func_ (
func), tcase_ (tcase)
354 return cont.begin ();
359 return cont.begin ();
364 return cont.rbegin ();
369 return cont.rbegin ();
374 RW_ASSERT (!
"logic error: should be never called");
381# define CONTAINER_TEST_DISPATCH(Alloc, fname, func, tcase) \
382 if (ContainerIds::UserPOD == func.elem_id_) \
383 fname (UserPOD (), (Alloc<UserPOD>*)0, func, tcase); \
385 fname (UserClass (), (Alloc<UserClass>*)0, func, tcase)
388#define DEFINE_CONTAINER_TEST_DISPATCH(fname) \
390 fname (const ContainerFunc &func, \
391 const ContainerTestCase &tcase) { \
392 if (ContainerIds::DefaultAlloc == func.alloc_id_) { \
393 CONTAINER_TEST_DISPATCH (std::allocator, fname, func, tcase); \
395 else if (ContainerIds::UserAlloc == func.alloc_id_) { \
396 CONTAINER_TEST_DISPATCH (UserAlloc, fname, func, tcase); \
399 RW_ASSERT (!"logic error: bad allocator"); \
400 } typedef void rw_unused_typedef
403#define CONTAINER_TFUNC(T, Allocator) \
404 void (*)(T*, Allocator<T>*, \
405 const ContainerTestCaseData<T>&)
407#define CONTAINER_TFUNC_ADDR(fname, T, Allocator) \
408 (VoidFunc*)(CONTAINER_TFUNC (T, Allocator)) \
409 &fname<T, Allocator<T> >
411#define DEFINE_CONTAINER_TEST_FUNCTIONS(fname) \
412 static VoidFunc* const fname ## _func_array [] = { \
413 CONTAINER_TFUNC_ADDR (fname, UserPOD, std::allocator), \
414 CONTAINER_TFUNC_ADDR (fname, UserPOD, UserAlloc), \
416 CONTAINER_TFUNC_ADDR (fname, UserClass, std::allocator), \
417 CONTAINER_TFUNC_ADDR (fname, UserClass, UserAlloc) \
#define _RWSTD_CONST_CAST(T, x)
const ContainerFunc & func_
const ContainerTestCase & tcase_
_TEST_EXPORT char * rw_expand(char *, const char *, _RWSTD_SIZE_T=_RWSTD_SIZE_MAX, _RWSTD_SIZE_T *=0)
_TEST_EXPORT int rw_run_cont_test(int, char **, const char *, const char *, ContainerIds::ContainerId, ContainerTestFunc *, const ContainerTest *, _RWSTD_SIZE_T)
void ContainerTestFunc(const ContainerFunc &, const ContainerTestCase &)
Cont::const_reverse_iterator ContConstRevIter
Cont::const_iterator ContConstIter
Cont::reverse_iterator ContRevIter
static ContRevIter begin(Cont &cont, ContRevIter *)
static ContConstRevIter begin(const Cont &cont, ContConstRevIter *)
static ContIter begin(Cont &cont, ContIter *)
virtual Cont & operator()(Cont &cont, const ContainerTestCaseData< ContVal > &) const
static ContConstIter begin(const Cont &cont, ContConstIter *)
ContainerIds::ElemId elem_id_
ContainerIds::ContainerId cont_id_
ContainerIds::IteratorId iter_id_
ContainerIds::AllocId alloc_id_
static ArgId arg_type(_RWSTD_SIZE_T id, int argno)
const ContainerTestCase * cases