ReactOS 0.4.16-dev-122-g325d74c
PtrSpecTest Class Reference
Inheritance diagram for PtrSpecTest:
Collaboration diagram for PtrSpecTest:

Classes

struct  binary_pred
 
struct  unary_pred
 

Protected Member Functions

void ptr_specialization_test ()
 this seems to be compile only test but...
 
void function_pointer ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (PtrSpecTest)
 
 CPPUNIT_TEST (ptr_specialization_test)
 
 CPPUNIT_TEST (function_pointer)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 19 of file ptrspec_test.cpp.

Member Function Documentation

◆ CPPUNIT_TEST() [1/2]

PtrSpecTest::CPPUNIT_TEST ( function_pointer  )
private

◆ CPPUNIT_TEST() [2/2]

PtrSpecTest::CPPUNIT_TEST ( ptr_specialization_test  )
private

◆ CPPUNIT_TEST_SUITE()

PtrSpecTest::CPPUNIT_TEST_SUITE ( PtrSpecTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

PtrSpecTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ function_pointer()

void PtrSpecTest::function_pointer ( )
protected

Definition at line 227 of file ptrspec_test.cpp.

228{
230 fs.push_back(&f1);
231 CPPUNIT_ASSERT( !fs.empty() );
232}
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
#define f1(x, y, z)
Definition: sha1.c:30
Definition: ffs.h:70

◆ ptr_specialization_test()

void PtrSpecTest::ptr_specialization_test ( )
protected

this seems to be compile only test but...

Definition at line 77 of file ptrspec_test.cpp.

78{
79 int *int_array[] = {0, 0, 0};
80 int const* cint_array[] = {0, 0, 0};
81
82 {
83 vector<void*> void_vect;
84 deque<void*> void_deque;
85 list<void*> void_list;
86#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
87 slist<void*> void_slist;
88#endif
89 }
90
91 {
92 typedef void (*FType)();
94 func_vector.push_back(&FTypeInstance);
95 }
96
97#if !defined(__GNUC__) || (__GNUC__ > 2)
98 {
99 typedef void (AClass::*MFType)();
100 vector<MFType> mem_func_vector;
101 mem_func_vector.push_back(&AClass::func);
102 }
103#endif
104
105 vector<int*> pint_vect;
106 vector<int*> pint_vect2;
107 vector<int const*> pcint_vect;
108 list<int*> pint_list;
109 list<int*> pint_list2;
110 list<int const*> pcint_list;
111#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
112 slist<int*> pint_slist;
113 slist<int*> pint_slist2;
114 slist<int const*> pcint_slist;
115#endif
116 deque<int*> pint_deque;
117 deque<int*> pint_deque2;
118 deque<int const*> pcint_deque;
119
120#if !defined (STLPORT) || defined (_STLP_MEMBER_TEMPLATES)
121 vector<int*> pint_vect_from_list(pint_list.begin(), pint_list.end());
122#endif
123 pint_vect.insert(pint_vect.end(), pint_vect2.begin(), pint_vect2.end());
124 pint_vect.insert(pint_vect.end(), int_array, int_array + 3);
125 pint_vect2.insert(pint_vect2.end(), int_array, int_array + 3);
126 pcint_vect.insert(pcint_vect.end(), int_array, int_array + 3);
127 pcint_vect.insert(pcint_vect.end(), cint_array, cint_array + 3);
128#if !defined (STLPORT) || !defined(_STLP_DEBUG) || defined(_STLP_MEMBER_TEMPLATES)
129 pcint_vect.insert(pcint_vect.end(), pint_vect2.begin(), pint_vect2.end());
130#endif
131 pcint_vect.insert(pcint_vect.end(), int_array, int_array + 3);
132#if !defined (STLPORT) || defined (_STLP_MEMBER_TEMPLATES)
133 pint_vect.insert(pint_vect.end(), pint_list.begin(), pint_list.end());
134 pcint_vect.insert(pcint_vect.end(), pint_list.begin(), pint_list.end());
135 pcint_vect.insert(pcint_vect.end(), pcint_list.begin(), pcint_list.end());
136 pint_vect.assign(pint_list.begin(), pint_list.end());
137 pcint_vect.assign(pint_list.begin(), pint_list.end());
138#endif
139 pint_vect.assign(int_array, int_array + 3);
140 pcint_vect.assign(int_array, int_array + 3);
141 pcint_vect.assign(cint_array, cint_array + 3);
142 copy(int_array, int_array + 3, back_inserter(pint_vect));
143
144#if !defined (STLPORT) || defined (_STLP_MEMBER_TEMPLATES)
145 pint_list.sort(binary_pred<int>());
146 pcint_list.sort(binary_pred<int const>());
147 pint_list.unique(binary_pred<int>());
148 pcint_list.unique(binary_pred<int const>());
149 pint_list.merge(pint_list, binary_pred<int>());
150 pcint_list.merge(pcint_list, binary_pred<int const>());
151 pint_list.remove_if(unary_pred<int>());
152 pcint_list.remove_if(unary_pred<int const>());
153#endif
154
155 copy(int_array, int_array + 3, back_inserter(pint_list));
156 copy(int_array, int_array + 3, back_inserter(pint_list2));
157 pint_list.insert(pint_list.end(), pint_list2.begin(), pint_list2.end());
158#if !defined (STLPORT) || defined (_STLP_MEMBER_TEMPLATES)
159 pcint_list.insert(pcint_list.end(), pint_list.begin(), pint_list.end());
160#endif
161#if !defined (STLPORT) || !defined(_STLP_DEBUG) || defined(_STLP_MEMBER_TEMPLATES)
162 pint_list.insert(pint_list.end(), pint_vect.begin(), pint_vect.end());
163 pcint_list.insert(pcint_list.end(), pint_vect.begin(), pint_vect.end());
164 pcint_list.insert(pcint_list.end(), pcint_vect.begin(), pcint_vect.end());
165 list<int*> pint_list_from_vect(pint_vect.begin(), pint_vect.end());
166 pint_list.assign(pint_vect.begin(), pint_vect.end());
167 pcint_list.assign(pint_vect.begin(), pint_vect.end());
168#endif
169 pint_list.insert(pint_list.begin(), int_array, int_array + 3);
170 pint_list.insert(pint_list.end(), int_array, int_array + 3);
171 pcint_list.insert(pcint_list.end(), int_array, int_array + 3);
172 pcint_list.insert(pcint_list.end(), cint_array, cint_array + 3);
173 pint_list.assign(int_array, int_array + 3);
174 pcint_list.assign(int_array, int_array + 3);
175 pcint_list.assign(cint_array, cint_array + 3);
176 //pint_list.assign(pcint_vect.begin(), pcint_vect.end());
177
178#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
179 copy(int_array, int_array + 3, front_inserter(pint_slist));
180 copy(int_array, int_array + 3, front_inserter(pint_slist2));
181 pint_slist.insert(pint_slist.end(), pint_slist2.begin(), pint_slist2.end());
182# if defined (_STLP_MEMBER_TEMPLATES)
183 pcint_slist.insert(pcint_slist.end(), pint_slist.begin(), pint_slist.end());
184# endif
185# if !defined (_STLP_DEBUG) || defined (_STLP_MEMBER_TEMPLATES)
186 pint_slist.insert(pint_slist.end(), pint_vect.begin(), pint_vect.end());
187 pcint_slist.insert(pcint_slist.end(), pint_vect.begin(), pint_vect.end());
188 pcint_slist.insert(pcint_slist.end(), pcint_vect.begin(), pcint_vect.end());
189 slist<int*> pint_slist_from_vect(pint_vect.begin(), pint_vect.end());
190 pint_slist.assign(pint_vect.begin(), pint_vect.end());
191 pcint_slist.assign(pint_vect.begin(), pint_vect.end());
192# endif
193 pint_slist.insert(pint_slist.end(), int_array, int_array + 3);
194 pcint_slist.insert(pcint_slist.end(), int_array, int_array + 3);
195 pcint_slist.insert(pcint_slist.end(), cint_array, cint_array + 3);
196 pint_slist.assign(int_array, int_array + 3);
197 pcint_slist.assign(int_array, int_array + 3);
198 pcint_slist.assign(cint_array, cint_array + 3);
199 //pint_slist.assign(pcint_vect.begin(), pcint_vect.end());
200#endif
201
202 copy(int_array, int_array + 3, back_inserter(pint_deque));
203 copy(int_array, int_array + 3, back_inserter(pint_deque2));
204 pint_deque.insert(pint_deque.end(), pint_deque2.begin(), pint_deque2.end());
205#if !defined (STLPORT) || defined (_STLP_MEMBER_TEMPLATES)
206 pcint_deque.insert(pcint_deque.end(), pint_deque.begin(), pint_deque.end());
207#endif
208#if !defined (STLPORT) || !defined(_STLP_DEBUG) || defined(_STLP_MEMBER_TEMPLATES)
209 pint_deque.insert(pint_deque.end(), pint_vect.begin(), pint_vect.end());
210 pcint_deque.insert(pcint_deque.end(), pint_vect.begin(), pint_vect.end());
211 pcint_deque.insert(pcint_deque.end(), pcint_vect.begin(), pcint_vect.end());
212 deque<int*> pint_deque_from_vect(pint_vect.begin(), pint_vect.end());
213 pint_deque.assign(pint_vect.begin(), pint_vect.end());
214 pcint_deque.assign(pint_vect.begin(), pint_vect.end());
215#endif
216 pint_deque.insert(pint_deque.end(), int_array, int_array + 3);
217 pcint_deque.insert(pcint_deque.end(), int_array, int_array + 3);
218 pcint_deque.insert(pcint_deque.end(), cint_array, cint_array + 3);
219 pint_deque.assign(int_array, int_array + 3);
220 pcint_deque.assign(int_array, int_array + 3);
221 pcint_deque.assign(cint_array, cint_array + 3);
222}
front_insert_iterator< _Container > _STLP_CALL front_inserter(_Container &__x)
Definition: _iterator.h:216
back_insert_iterator< _Container > _STLP_CALL back_inserter(_Container &__x)
Definition: _iterator.h:187
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
void func()
Definition: _deque.h:404
iterator insert(iterator __pos, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _deque.h:730
iterator end()
Definition: _deque.h:433
iterator begin()
Definition: _deque.h:432
void assign(size_type __n, const _Tp &__val)
Definition: _deque.h:598
Definition: list.h:37
void unique()
Definition: _list.h:645
void merge(_Self &__x)
Definition: _list.h:648
void sort()
Definition: _list.h:660
iterator begin()
Definition: _list.h:367
iterator end()
Definition: _list.h:370
void assign(size_type __n, const_reference __val)
Definition: _list.h:555
iterator insert(iterator __pos, const_reference __x=value_type())
Definition: _list.h:420
Definition: _slist.h:57
iterator end()
Definition: _slist.h:420
iterator insert(iterator __pos, const value_type &__x=_Tp())
Definition: _slist.h:635
void assign(size_type __n, const _Tp &__val)
Definition: _slist.h:348
iterator begin()
Definition: _slist.h:416
void FTypeInstance()
void func_vector(void)
iterator end()
Definition: _vector.h:184
void push_back(const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _vector.h:379
iterator insert(iterator __pos, const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _vector.c:223
iterator begin()
Definition: _vector.h:182
void assign(size_type __n, const _Tp &__val)
Definition: _vector.h:318

The documentation for this class was generated from the following file: