Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions
20.tuple.cnstr.cpp File Reference
#include <rw_driver.h>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <tuple>
#include <type_traits>
#include <rw_valcmp.h>
#include <rw_allocator.h>
#include "20.tuple.h"
#include <string>
Include dependency graph for 20.tuple.cnstr.cpp:

Go to the source code of this file.

Data Structures

struct  String
 

Macros

#define CHECK(N)
 
#define INTEGER_CONSTANT   256
 

Functions

template<class T , class U = T>
bool equal (const T &x, const U &y)
 
template<>
bool equal (const float &x, const float &y)
 
template<>
bool equal (const char *const &x, const char *const &y)
 
template<class T , class U >
void assert (int line, unsigned index, const char *tuple_name, const T &t, const U &u)
 
void assert (int line, unsigned index, const char *tuple_name, const UserDefined &t, const UserDefined &u)
 
template<class T , class U >
void assert (int line, unsigned index, const char *tuple_name, const std::tuple< T > &t, const std::tuple< U > &u)
 
template<unsigned Index, class Tuple , class... Elements>
void test_impl (int line, const Tuple &tuple, const Elements &... values)
 
template<unsigned Index, class Tuple >
void test_impl (int, const Tuple &)
 
template<unsigned Index, class Tuple , class Element , class... Elements>
void test_impl (int line, const Tuple &tuple, const Element &value, const Elements &... values)
 
template<class Tuple , class... Elements>
void test (int line, const Tuple &tuple, const Elements &... values)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   N)
Value:
rw_assert (a == e, __FILE__, line, \
"UserDefined::" #N "; got %u, expected %u", a, e)
#define N
Definition 17.names.cpp:157
#define e
Definition 17.names.cpp:118
#define line
Definition 17.names.cpp:490
#define a
Definition 17.names.cpp:109
static count_type expect
Definition 20.tuple.h:144
static count_type actual
Definition 20.tuple.h:141

◆ INTEGER_CONSTANT

#define INTEGER_CONSTANT   256

Function Documentation

◆ assert() [1/3]

template<class T , class U >
void assert ( int  line,
unsigned  index,
const char *  tuple_name,
const std::tuple< T > &  t,
const std::tuple< U > &  u 
)

Definition at line 105 of file 20.tuple.cnstr.cpp.

◆ assert() [2/3]

template<class T , class U >
void assert ( int  line,
unsigned  index,
const char *  tuple_name,
const T &  t,
const U &  u 
)

Definition at line 70 of file 20.tuple.cnstr.cpp.

◆ assert() [3/3]

void assert ( int  line,
unsigned  index,
const char *  tuple_name,
const UserDefined &  t,
const UserDefined &  u 
)

Definition at line 80 of file 20.tuple.cnstr.cpp.

◆ equal() [1/3]

template<>
bool equal ( const char *const &  x,
const char *const &  y 
)

Definition at line 63 of file 20.tuple.cnstr.cpp.

◆ equal() [2/3]

template<>
bool equal ( const float &  x,
const float &  y 
)

Definition at line 57 of file 20.tuple.cnstr.cpp.

◆ equal() [3/3]

template<class T , class U = T>
bool equal ( const T &  x,
const U &  y 
)

20.tuple.cnstr.cpp - tests exercising tuple constructors and operators

Id
20.tuple.cnstr.cpp 677985 2008-07-18 18:05:55Z elemings

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 2008 Rogue Wave Software, Inc.

Definition at line 51 of file 20.tuple.cnstr.cpp.

◆ main()

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

Definition at line 645 of file 20.tuple.cnstr.cpp.

◆ test()

template<class Tuple , class... Elements>
void test ( int  line,
const Tuple &  tuple,
const Elements &...  values 
)

Definition at line 141 of file 20.tuple.cnstr.cpp.

◆ test_impl() [1/3]

template<unsigned Index, class Tuple , class Element , class... Elements>
void test_impl ( int  line,
const Tuple &  tuple,
const Element &  value,
const Elements &...  values 
)

Definition at line 129 of file 20.tuple.cnstr.cpp.

◆ test_impl() [2/3]

template<unsigned Index, class Tuple , class... Elements>
void test_impl ( int  line,
const Tuple &  tuple,
const Elements &...  values 
)

◆ test_impl() [3/3]

template<unsigned Index, class Tuple >
void test_impl ( int  ,
const Tuple &   
)

Definition at line 124 of file 20.tuple.cnstr.cpp.