Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions
23.vector.cons.cpp File Reference
#include <memory>
#include <vector>
#include <cstddef>
#include <rw_alg_test.h>
#include <rw_value.h>
#include <rw_driver.h>
#include <rw_new.h>
Include dependency graph for 23.vector.cons.cpp:

Go to the source code of this file.

Data Structures

struct  test_iterator< RandomAccessIterator, T, Reference, Pointer, Difference >
 

Macros

#define TEST_TYPE(T, vectorT)
 
#define TEST_REFERENCE(T, vectorT)
 
#define MEMFUN(result, name, arg_list)
 
#define FUN(result, name, arg_list)
 
#define VECTOR(T)   std::vector<T, std::allocator<T> >
 
#define TEST(what, T)
 
#define VECTOR(T, A)   std::vector<T, A<T> >
 
#define TEST(what, T, A)   test_ ##what ((VECTOR (T, A)*)0, (T*)0, A<T>())
 

Functions

template<class Vector , class T , class Allocator >
void test_types (Vector *, T *, Allocator)
 
template<class Vector , class T , class Allocator >
void test_signatures (Vector *, T *, Allocator)
 
void test_ctors ()
 
template<class Vector , class T , class Alloc >
void test_ctors (Vector *, T *, Alloc alloc)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ FUN

#define FUN (   result,
  name,
  arg_list 
)
Value:
do { \
result (*pf) arg_list = &name; \
_RWSTD_UNUSED (pf); \
} while (0)
#define pf
Definition 17.names.cpp:516
const char * name
Definition codecvt1.cpp:72

◆ MEMFUN

#define MEMFUN (   result,
  name,
  arg_list 
)
Value:
do { \
result (Vector::*pf) arg_list = &Vector::name; \
_RWSTD_UNUSED (pf); \
} while (0)
std::vector< UserClass, std::allocator< UserClass > > Vector

◆ TEST [1/2]

#define TEST (   what,
  T 
)
Value:
do { \
/* establish a checkpoint for memory leaks */ \
rwt_check_leaks (0, 0); \
test_ ##what ((VECTOR (T)*)0, (T*)0, std::allocator<T>()); \
/* verify that no memory leaked */ \
std::size_t nbytes; \
const std::size_t nblocks = rwt_check_leaks (&nbytes, 0); \
rw_assert (!nblocks && !nbytes, 0, __LINE__, \
#what " test leaked %lu bytes in %lu blocks", \
nbytes, nblocks); \
} while (0)
#define T
Definition 17.names.cpp:163
#define VECTOR(T)
_TEST_EXPORT _RWSTD_SIZE_T rwt_check_leaks(_RWSTD_SIZE_T *, const rwt_free_store *)
Definition new.cpp:684

◆ TEST [2/2]

#define TEST (   what,
  T,
  A 
)    test_ ##what ((VECTOR (T, A)*)0, (T*)0, A<T>())

◆ TEST_REFERENCE

#define TEST_REFERENCE (   T,
  vectorT 
)
Value:
{ \
typename Vector::value_type v; \
T t = v; \
_RWSTD_UNUSED (t); \
}
#define t
Definition 17.names.cpp:136
#define v
Definition 17.names.cpp:138

◆ TEST_TYPE

#define TEST_TYPE (   T,
  vectorT 
)
Value:
{ \
T *t = (typename Vector::vectorT*)0; \
_RWSTD_UNUSED (t); \
}

◆ VECTOR [1/2]

#define VECTOR (   T)    std::vector<T, std::allocator<T> >

◆ VECTOR [2/2]

#define VECTOR (   T,
  A 
)    std::vector<T, A<T> >

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 787 of file 23.vector.cons.cpp.

◆ test_ctors() [1/2]

void test_ctors ( )

Definition at line 298 of file 23.vector.cons.cpp.

◆ test_ctors() [2/2]

template<class Vector , class T , class Alloc >
void test_ctors ( Vector *  ,
T *  ,
Alloc  alloc 
)

Definition at line 542 of file 23.vector.cons.cpp.

◆ test_signatures()

template<class Vector , class T , class Allocator >
void test_signatures ( Vector *  ,
T *  ,
Allocator   
)

Definition at line 190 of file 23.vector.cons.cpp.

◆ test_types()

template<class Vector , class T , class Allocator >
void test_types ( Vector *  ,
T *  ,
Allocator   
)

Definition at line 126 of file 23.vector.cons.cpp.