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

Go to the source code of this file.

Macros

#define Size(sig)   StringIds::size_ ## sig
 
#define Length(sig)   StringIds::length_ ## sig
 
#define MaxSize(sig)   StringIds::max_size_ ## sig
 
#define Resize(sig)   StringIds::resize_ ## sig
 
#define Capacity(sig)   StringIds::capacity_ ## sig
 
#define Reserve(sig)   StringIds::reserve_ ## sig
 
#define Clear(sig)   StringIds::clear_ ## sig
 
#define Empty(sig)   StringIds::empty_ ## sig
 
#define length_void_test_cases   size_void_test_cases
 
#define TEST(str, res)
 
#define TEST(str)
 
#define TEST(str, size, val, res, bthrow)
 
#define TEST(str, size, res, bthrow)
 
#define TEST(str)
 
#define TEST(str, size, bthrow)
 
#define TEST(str)
 
#define TEST(str)
 
#define TEST(str, res)
 
#define TEST(gsig, sig)
 

Functions

template<class charT , class Traits , class Allocator >
void test_capacity (charT, Traits *, Allocator *, const StringFunc &func, const StringTestCase &tcase)
 
 DEFINE_STRING_TEST_DISPATCH (test_capacity)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ Capacity

#define Capacity (   sig)    StringIds::capacity_ ## sig

Definition at line 46 of file 21.string.capacity.cpp.

◆ Clear

#define Clear (   sig)    StringIds::clear_ ## sig

Definition at line 48 of file 21.string.capacity.cpp.

◆ Empty

#define Empty (   sig)    StringIds::empty_ ## sig

Definition at line 49 of file 21.string.capacity.cpp.

◆ Length

#define Length (   sig)    StringIds::length_ ## sig

Definition at line 43 of file 21.string.capacity.cpp.

◆ length_void_test_cases

#define length_void_test_cases   size_void_test_cases

◆ MaxSize

#define MaxSize (   sig)    StringIds::max_size_ ## sig

Definition at line 44 of file 21.string.capacity.cpp.

◆ Reserve

#define Reserve (   sig)    StringIds::reserve_ ## sig

Definition at line 47 of file 21.string.capacity.cpp.

◆ Resize

#define Resize (   sig)    StringIds::resize_ ## sig

Definition at line 45 of file 21.string.capacity.cpp.

◆ Size

#define Size (   sig)    StringIds::size_ ## sig

21.string.capacity.cpp - test exercising [lib.string.capacity]

$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.

Copyright 2006 Rogue Wave Software.

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

◆ TEST [1/10]

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

◆ TEST [2/10]

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

◆ TEST [3/10]

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

◆ TEST [4/10]

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

◆ TEST [5/10]

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

◆ TEST [6/10]

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

◆ TEST [7/10]

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

◆ TEST [8/10]

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

◆ TEST [9/10]

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

◆ TEST [10/10]

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

Function Documentation

◆ DEFINE_STRING_TEST_DISPATCH()

DEFINE_STRING_TEST_DISPATCH ( test_capacity  )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 816 of file 21.string.capacity.cpp.

◆ test_capacity()

template<class charT , class Traits , class Allocator >
void test_capacity ( charT  ,
Traits *  ,
Allocator *  ,
const StringFunc &  func,
const StringTestCase &  tcase 
)

Definition at line 506 of file 21.string.capacity.cpp.