Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions
21.string.cons.cpp File Reference
#include <string>
#include <stdexcept>
#include <cstddef>
#include <rw_strings.h>
#include <rw_alg_test.h>
#include <rw_driver.h>
#include <rw_allocator.h>
#include <rw_char.h>
#include <rw_new.h>
Include dependency graph for 21.string.cons.cpp:

Go to the source code of this file.

Data Structures

struct  ConsRange< List, Iterator >
 
struct  ConsRangeOverload< List, Iterator >
 

Macros

#define Cons(sig)   StringIds::ctor_ ## sig
 
#define OpSet(sig)   StringIds::op_set_ ## sig
 
#define alloc_test_cases   void_test_cases
 
#define TEST(dummy)
 
#define cptr_alloc_test_cases   cptr_test_cases
 
#define TEST(arg, res)
 
#define TEST(arg, res)
 
#define cptr_size_alloc_test_cases   cptr_size_test_cases
 
#define TEST(arg, size, res)
 
#define TEST(arg, off, res, bthrow)
 
#define range_test_cases   cstr_size_size_test_cases
 
#define cstr_size_size_alloc_test_cases   cstr_size_size_test_cases
 
#define range_alloc_test_cases   cstr_size_size_test_cases
 
#define TEST(arg, off, size, res, bthrow)
 
#define size_val_alloc_test_cases   size_val_test_cases
 
#define TEST(size, val, res)
 
#define TEST(str, arg, res, bthrow)
 
#define TEST(str, arg, res, bthrow)
 
#define TEST(str, val, res)
 
#define TEST(Iterator)
 
#define TEST(Iterator)
 
#define TEST(sig)
 
#define TEST(sig)
 

Functions

template<class charT , class Traits , class Allocator >
void test_cons (charT *, Traits *, Allocator *, const RangeBase< std::basic_string< charT, Traits, Allocator > > &rng, const StringTestCaseData< charT > &tdata)
 
template<class charT , class Traits , class Allocator >
void test_op_set (charT *, Traits *, Allocator *, const StringTestCaseData< charT > &tdata)
 
template<class charT , class Traits , class Allocator >
void test_cons (charT *, Traits *, Allocator *, const StringTestCaseData< charT > &tdata)
 
 DEFINE_STRING_TEST_FUNCTIONS (test_cons)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ alloc_test_cases

#define alloc_test_cases   void_test_cases

◆ Cons

#define Cons (   sig)    StringIds::ctor_ ## sig

21.string.cons.cpp - test exercising string constructors [lib.string.cons]

$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 41 of file 21.string.cons.cpp.

◆ cptr_alloc_test_cases

#define cptr_alloc_test_cases   cptr_test_cases

◆ cptr_size_alloc_test_cases

#define cptr_size_alloc_test_cases   cptr_size_test_cases

◆ cstr_size_size_alloc_test_cases

#define cstr_size_size_alloc_test_cases   cstr_size_size_test_cases

◆ OpSet

#define OpSet (   sig)    StringIds::op_set_ ## sig

Definition at line 42 of file 21.string.cons.cpp.

◆ range_alloc_test_cases

#define range_alloc_test_cases   cstr_size_size_test_cases

◆ range_test_cases

#define range_test_cases   cstr_size_size_test_cases

◆ size_val_alloc_test_cases

#define size_val_alloc_test_cases   size_val_test_cases

◆ TEST [1/14]

#define TEST (   arg,
  off,
  res,
  bthrow 
)
Value:
{ \
__LINE__, off, -1, -1, -1, -1, \
0, 0, 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 [2/14]

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

◆ TEST [3/14]

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

◆ TEST [4/14]

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

◆ TEST [5/14]

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

◆ TEST [6/14]

#define TEST (   dummy)
Value:
{ \
__LINE__, -1, -1, -1, -1, -1, \
0, 0, dummy, sizeof dummy - 1, \
"", 0, 0 \
}

◆ TEST [7/14]

#define TEST (   Iterator)
Value:
do { \
typedef typename String::Iterator Iter; \
static const \
ConsRangeOverload<String, Iter> rng; \
test_cons ((charT*)0, (Traits*)0, (Allocator*)0, rng, tdata); \
} while (0)
#define charT
Definition 17.names.cpp:456
std::char_traits< S > Traits
std::ostream_iterator< int, char, std::char_traits< char > > Iter
Definition alg7.cpp:64

◆ TEST [8/14]

#define TEST (   Iterator)
Value:
do { \
typedef Iterator<charT> Iter; \
static const \
ConsRange<String, Iter> rng; \
test_cons ((charT*)0, (Traits*)0, (Allocator*)0, rng, tdata); \
} while (0)

◆ TEST [9/14]

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

◆ TEST [10/14]

#define TEST (   sig)
Value:
{ \
OpSet (sig), sig ## _op_set_test_cases, \
sizeof sig ## _op_set_test_cases \
/ sizeof *sig ## _op_set_test_cases \
}

◆ TEST [11/14]

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

◆ TEST [12/14]

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

◆ TEST [13/14]

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

◆ TEST [14/14]

#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

◆ DEFINE_STRING_TEST_FUNCTIONS()

DEFINE_STRING_TEST_FUNCTIONS ( test_cons  )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1113 of file 21.string.cons.cpp.

◆ test_cons() [1/2]

template<class charT , class Traits , class Allocator >
void test_cons ( charT *  ,
Traits *  ,
Allocator *  ,
const RangeBase< std::basic_string< charT, Traits, Allocator > > &  rng,
const StringTestCaseData< charT > &  tdata 
)

Definition at line 619 of file 21.string.cons.cpp.

◆ test_cons() [2/2]

template<class charT , class Traits , class Allocator >
void test_cons ( charT *  ,
Traits *  ,
Allocator *  ,
const StringTestCaseData< charT > &  tdata 
)

Definition at line 1046 of file 21.string.cons.cpp.

◆ test_op_set()

template<class charT , class Traits , class Allocator >
void test_op_set ( charT *  ,
Traits *  ,
Allocator *  ,
const StringTestCaseData< charT > &  tdata 
)

Definition at line 834 of file 21.string.cons.cpp.