34#ifndef _RWSTD_NO_EXT_CXX_0X
41 const char* typeT,
const char* typeU,
45 "%s<%s>::type is %{?}exactly%{:}not%{;} %s",
46 trait, typeT, success, typeU);
49#define TEST(Trait,TypeT,TypeU) \
50 test_trait(__LINE__, #Trait, #TypeT, #TypeU, \
51 std::is_same<Trait<TypeT>::type, TypeU>::value)
55static void test_remove_extent ()
57 TEST (std::remove_extent,
int,
int);
58 TEST (std::remove_extent,
int[],
int);
59 TEST (std::remove_extent,
int[5],
int);
60 TEST (std::remove_extent,
int[][5],
int[5]);
61 TEST (std::remove_extent,
int[5][5],
int[5]);
63 TEST (std::remove_extent,
void,
void);
64 TEST (std::remove_extent,
void*,
void*);
66 TEST (std::remove_extent,
long (*)[1],
long (*)[1]);
68 TEST (std::remove_extent,
long (),
long ());
69 TEST (std::remove_extent,
long (*)(),
long (*)());
70 TEST (std::remove_extent,
long (&)(),
long (&)());
73static void test_remove_all_extents ()
75 TEST (std::remove_all_extents,
int,
int);
76 TEST (std::remove_all_extents,
int[],
int);
77 TEST (std::remove_all_extents,
int[5],
int);
78 TEST (std::remove_all_extents,
int[][5],
int);
79 TEST (std::remove_all_extents,
int[5][5],
int);
81 TEST (std::remove_all_extents,
void,
void);
82 TEST (std::remove_all_extents,
void*,
void*);
84 TEST (std::remove_all_extents,
long (*)[1],
long (*)[1]);
86 TEST (std::remove_all_extents,
long (),
long ());
87 TEST (std::remove_all_extents,
long (*)(),
long (*)());
88 TEST (std::remove_all_extents,
long (&)(),
long (&)());
95 test_remove_extent ();
96 test_remove_all_extents ();
110 "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
118int main (
int argc,
char *argv[])
120 return rw_test (argc, argv, __FILE__,
void run_test(const ForwardIterator &dummy, T *, Predicate *pred)
_TEST_EXPORT int rw_test(int argc, char *argv[], const char *filename, const char *clause, const char *comment, int(*testfun)(int, char **), const char *optspec,...)
_TEST_EXPORT int rw_assert(int, const char *, int, const char *,...)
_TEST_EXPORT int rw_warn(int, const char *, int, const char *,...)