Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Macros | Enumerations | Functions
26.valarray.cons.cpp File Reference
#include <cstdlib>
#include <valarray>
#include <rw_value.h>
#include <rw_driver.h>
#include <rw_printf.h>
Include dependency graph for 26.valarray.cons.cpp:

Go to the source code of this file.

Macros

#define TEST(n)    test_ctor ((const T*)0, tname, SizeCtor, copy, __LINE__, "0", n)
 
#define TEST(str, n)    test_ctor ((const T*)0, tname, ValueCtor, copy, __LINE__, str, n)
 
#define TEST(str)    test_ctor ((const T*)0, tname, ArrayCtor, copy, __LINE__, str, 0)
 
#define TEST(T)   test_ctors ((const T*)0, #T)
 

Enumerations

enum  CtorId { DefaultCtor , SizeCtor , ValueCtor , ArrayCtor }
 

Functions

template<class T >
T * make_array (const T *, const char *s, std::size_t *psize)
 
template<class T >
void delete_array (const T *array, std::size_t)
 
template<class T >
const std::size_t * count (const T *)
 
template<class T >
T value (const T &val)
 
UserClass * make_array (const UserClass *, const char *s, std::size_t *psize)
 
void delete_array (const UserClass *array, std::size_t nelems)
 
const std::size_t * count (const UserClass *)
 
int value (const UserClass &val)
 
template<class T >
void test_ctor (const T *, const char *tname, CtorId which, bool copy, int line, const char *str, std::size_t nelems)
 
template<class T >
void test_default_ctor (const T *, const char *tname, bool copy)
 
template<class T >
void test_size_ctor (const T *, const char *tname, bool copy)
 
template<class T >
void test_value_ctor (const T *, const char *tname, bool copy)
 
template<class T >
void test_array_ctor (const T *, const char *tname, bool copy)
 
template<class T >
void test_copy_ctor (const T *, const char *tname)
 
template<class T >
void test_ctors (const T *, const char *tname)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ TEST [1/4]

#define TEST (   n)     test_ctor ((const T*)0, tname, SizeCtor, copy, __LINE__, "0", n)

◆ TEST [2/4]

#define TEST (   str)     test_ctor ((const T*)0, tname, ArrayCtor, copy, __LINE__, str, 0)

◆ TEST [3/4]

#define TEST (   str,
  n 
)     test_ctor ((const T*)0, tname, ValueCtor, copy, __LINE__, str, n)

◆ TEST [4/4]

#define TEST (   T)    test_ctors ((const T*)0, #T)

Enumeration Type Documentation

◆ CtorId

enum CtorId
Enumerator
DefaultCtor 
SizeCtor 
ValueCtor 
ArrayCtor 

Definition at line 158 of file 26.valarray.cons.cpp.

Function Documentation

◆ count() [1/2]

template<class T >
const std::size_t * count ( const T *  )

Definition at line 88 of file 26.valarray.cons.cpp.

◆ count() [2/2]

const std::size_t * count ( const UserClass *  )

Definition at line 152 of file 26.valarray.cons.cpp.

◆ delete_array() [1/2]

template<class T >
void delete_array ( const T *  array,
std::size_t   
)

Definition at line 80 of file 26.valarray.cons.cpp.

◆ delete_array() [2/2]

void delete_array ( const UserClass *  array,
std::size_t  nelems 
)

Definition at line 141 of file 26.valarray.cons.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 435 of file 26.valarray.cons.cpp.

◆ make_array() [1/2]

template<class T >
T * make_array ( const T *  ,
const char *  s,
std::size_t *  psize 
)

26.valarray.cons.cpp - tests exercising valarray constructors

$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 26.valarray.cons.cpp.

◆ make_array() [2/2]

UserClass * make_array ( const UserClass *  ,
const char *  s,
std::size_t *  psize 
)

Definition at line 99 of file 26.valarray.cons.cpp.

◆ test_array_ctor()

template<class T >
void test_array_ctor ( const T *  ,
const char *  tname,
bool  copy 
)

Definition at line 361 of file 26.valarray.cons.cpp.

◆ test_copy_ctor()

template<class T >
void test_copy_ctor ( const T *  ,
const char *  tname 
)

Definition at line 389 of file 26.valarray.cons.cpp.

◆ test_ctor()

template<class T >
void test_ctor ( const T *  ,
const char *  tname,
CtorId  which,
bool  copy,
int  line,
const char *  str,
std::size_t  nelems 
)

Definition at line 168 of file 26.valarray.cons.cpp.

◆ test_ctors()

template<class T >
void test_ctors ( const T *  ,
const char *  tname 
)

Definition at line 399 of file 26.valarray.cons.cpp.

◆ test_default_ctor()

template<class T >
void test_default_ctor ( const T *  ,
const char *  tname,
bool  copy 
)

Definition at line 296 of file 26.valarray.cons.cpp.

◆ test_size_ctor()

template<class T >
void test_size_ctor ( const T *  ,
const char *  tname,
bool  copy 
)

Definition at line 308 of file 26.valarray.cons.cpp.

◆ test_value_ctor()

template<class T >
void test_value_ctor ( const T *  ,
const char *  tname,
bool  copy 
)

Definition at line 337 of file 26.valarray.cons.cpp.

◆ value() [1/2]

template<class T >
T value ( const T &  val)

Definition at line 92 of file 26.valarray.cons.cpp.

◆ value() [2/2]

int value ( const UserClass &  val)

Definition at line 154 of file 26.valarray.cons.cpp.