Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions
23.list.insert.cpp File Reference
#include <list>
#include <stdexcept>
#include <cstddef>
#include <rw_lists.h>
#include <rw_alg_test.h>
#include <rw_driver.h>
#include <rw_allocator.h>
#include <rw_new.h>
Include dependency graph for 23.list.insert.cpp:

Go to the source code of this file.

Data Structures

struct  InsertRange< List, Iterator >
 
struct  InsertRangeOverload< List, Iterator >
 
struct  InsertRangePtrOverload< List, Iterator >
 

Macros

#define Insert(sig)   ListIds::insert_ ## sig
 
#define TEST(lst, off, arg, off2, size2, res, bthrow)
 
#define TEST(lst, off, size, val, res, bthrow)
 
#define TEST(lst, off, val, res, bthrow)
 
#define TEST(str, val, res)
 
#define TEST(str, val, res)
 
#define TEST(Iterator)
 
#define TEST(Iterator)
 
#define TEST(Iterator)
 
#define TEST(sig)
 
#define TEST(sig)
 

Functions

template<class InputIterator , class Distance >
void _rw_advance (InputIterator &it, Distance dist)
 
template<class InputIterator >
std::size_t _rw_distance (InputIterator first, InputIterator last)
 
template<class T , class Allocator >
void test_insert (T *, Allocator *, const ContRangeBase< std::list< T, Allocator > > &rng, const ContainerTestCaseData< T > &tdata)
 
template<class T , class Allocator >
void test_insert (T *, Allocator *, const ContainerTestCaseData< T > &tdata)
 
 DEFINE_CONTAINER_TEST_FUNCTIONS (test_insert)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ Insert

#define Insert (   sig)    ListIds::insert_ ## sig

23.list.insert.cpp - test exercising [lib.list.insert]

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 40 of file 23.list.insert.cpp.

◆ TEST [1/10]

#define TEST (   Iterator)
Value:
do { \
typedef typename List::Iterator Iter; \
static const \
InsertRangePtrOverload<List, Iter> rng; \
test_insert ((T*)0, (Allocator*)0, rng, tdata); \
} while (0)
#define T
Definition 17.names.cpp:163
std::ostream_iterator< int, char, std::char_traits< char > > Iter
Definition alg7.cpp:64

◆ TEST [2/10]

#define TEST (   Iterator)
Value:
do { \
typedef typename List::Iterator Iter; \
static const \
InsertRangeOverload<List, Iter> rng; \
test_insert ((T*)0, (Allocator*)0, rng, tdata); \
} while (0)

◆ TEST [3/10]

#define TEST (   Iterator)
Value:
do { \
typedef Iterator<T> Iter; \
static const \
InsertRange<List, Iter> rng; \
test_insert ((T*)0, (Allocator*)0, rng, tdata); \
} while (0)

◆ TEST [4/10]

#define TEST (   lst,
  off,
  arg,
  off2,
  size2,
  res,
  bthrow 
)
Value:
{ \
__LINE__, off, -1, off2, size2, -1, lst, sizeof lst - 1, \
arg, sizeof arg - 1, res, sizeof res - 1, bthrow \
}
#define res
Definition 17.names.cpp:531
#define off
Definition 17.names.cpp:507
int arg
Definition locale.cpp:2806

◆ TEST [5/10]

#define TEST (   lst,
  off,
  size,
  val,
  res,
  bthrow 
)
Value:
{ \
__LINE__, off, size, -1, -1, val, lst, sizeof lst - 1, \
0, 0, res, sizeof res - 1, bthrow \
}
#define val
Definition 17.names.cpp:570

◆ TEST [6/10]

#define TEST (   lst,
  off,
  val,
  res,
  bthrow 
)
Value:
{ __LINE__, off, -1, -1, -1, val, lst, sizeof lst - 1, 0, \
0, res, sizeof res - 1, bthrow }

◆ TEST [7/10]

#define TEST (   sig)
Value:
{ \
Insert (sig), sig ## _test_cases, \
sizeof sig ## _test_cases / sizeof *sig ## _test_cases \
}

◆ TEST [8/10]

#define TEST (   sig)
Value:
{ \
ListIds::sig ## _cref, sig ## _test_cases, \
sizeof sig ## _test_cases / sizeof *sig ## _test_cases \
}

◆ TEST [9/10]

#define TEST (   str,
  val,
  res 
)
Value:
{ \
__LINE__, -1, -1, -1, -1, val, str, sizeof str - 1, \
0, 0, res, sizeof res - 1, 0 }
const char * str
Definition exec.cpp:170

◆ TEST [10/10]

#define TEST (   str,
  val,
  res 
)
Value:
{ \
__LINE__, -1, -1, -1, -1, val, str, sizeof str - 1, \
0, 0, res, sizeof res - 1, 0 }

Function Documentation

◆ _rw_advance()

template<class InputIterator , class Distance >
void _rw_advance ( InputIterator &  it,
Distance  dist 
)
inline

Definition at line 352 of file 23.list.insert.cpp.

◆ _rw_distance()

template<class InputIterator >
std::size_t _rw_distance ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 362 of file 23.list.insert.cpp.

◆ DEFINE_CONTAINER_TEST_FUNCTIONS()

DEFINE_CONTAINER_TEST_FUNCTIONS ( test_insert  )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 797 of file 23.list.insert.cpp.

◆ test_insert() [1/2]

template<class T , class Allocator >
void test_insert ( T *  ,
Allocator *  ,
const ContainerTestCaseData< T > &  tdata 
)

Definition at line 730 of file 23.list.insert.cpp.

◆ test_insert() [2/2]

template<class T , class Allocator >
void test_insert ( T *  ,
Allocator *  ,
const ContRangeBase< std::list< T, Allocator > > &  rng,
const ContainerTestCaseData< T > &  tdata 
)

Definition at line 476 of file 23.list.insert.cpp.