1 /* Unit test suite for msvcrt C++ objects
3 * Copyright 2003 Jon Griffiths
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "wine/test.h"
23 typedef void (*vtable_ptr
)(void);
25 typedef struct __exception
32 typedef struct __type_info
41 #define __thiscall __stdcall
43 #define __thiscall __cdecl
46 /* Function pointers. We need to use these to call these funcs as __thiscall */
47 static HMODULE hMsvcrt
;
49 static void* (__cdecl
*poperator_new
)(unsigned int);
50 static void (__cdecl
*poperator_delete
)(void*);
51 static void* (__cdecl
*pmalloc
)(unsigned int);
52 static void (__cdecl
*pfree
)(void*);
55 static void (__thiscall
*pexception_ctor
)(exception
*,LPCSTR
*);
56 static void (__thiscall
*pexception_copy_ctor
)(exception
*,exception
*);
57 static void (__thiscall
*pexception_default_ctor
)(exception
*);
58 static void (__thiscall
*pexception_dtor
)(exception
*);
59 static exception
* (__thiscall
*pexception_opequals
)(exception
*,exception
*);
60 static char* (__thiscall
*pexception_what
)(exception
*);
61 static vtable_ptr
*pexception_vtable
;
62 static void (__thiscall
*pexception_vector_dtor
)(exception
*,unsigned int);
63 static void (__thiscall
*pexception_scalar_dtor
)(exception
*,unsigned int);
66 static void (__thiscall
*pbad_typeid_ctor
)(exception
*,LPCSTR
);
67 static void (__thiscall
*pbad_typeid_ctor_closure
)(exception
*);
68 static void (__thiscall
*pbad_typeid_copy_ctor
)(exception
*,exception
*);
69 static void (__thiscall
*pbad_typeid_dtor
)(exception
*);
70 static exception
* (__thiscall
*pbad_typeid_opequals
)(exception
*,exception
*);
71 static char* (__thiscall
*pbad_typeid_what
)(exception
*);
72 static vtable_ptr
*pbad_typeid_vtable
;
73 static void (__thiscall
*pbad_typeid_vector_dtor
)(exception
*,unsigned int);
74 static void (__thiscall
*pbad_typeid_scalar_dtor
)(exception
*,unsigned int);
77 static void (__thiscall
*pbad_cast_ctor
)(exception
*,LPCSTR
*);
78 static void (__thiscall
*pbad_cast_ctor2
)(exception
*,LPCSTR
);
79 static void (__thiscall
*pbad_cast_ctor_closure
)(exception
*);
80 static void (__thiscall
*pbad_cast_copy_ctor
)(exception
*,exception
*);
81 static void (__thiscall
*pbad_cast_dtor
)(exception
*);
82 static exception
* (__thiscall
*pbad_cast_opequals
)(exception
*,exception
*);
83 static char* (__thiscall
*pbad_cast_what
)(exception
*);
84 static vtable_ptr
*pbad_cast_vtable
;
85 static void (__thiscall
*pbad_cast_vector_dtor
)(exception
*,unsigned int);
86 static void (__thiscall
*pbad_cast_scalar_dtor
)(exception
*,unsigned int);
88 /* __non_rtti_object */
89 static void (__thiscall
*p__non_rtti_object_ctor
)(exception
*,LPCSTR
);
90 static void (__thiscall
*p__non_rtti_object_copy_ctor
)(exception
*,exception
*);
91 static void (__thiscall
*p__non_rtti_object_dtor
)(exception
*);
92 static exception
* (__thiscall
*p__non_rtti_object_opequals
)(exception
*,exception
*);
93 static char* (__thiscall
*p__non_rtti_object_what
)(exception
*);
94 static vtable_ptr
*p__non_rtti_object_vtable
;
95 static void (__thiscall
*p__non_rtti_object_vector_dtor
)(exception
*,unsigned int);
96 static void (__thiscall
*p__non_rtti_object_scalar_dtor
)(exception
*,unsigned int);
99 static void (__thiscall
*ptype_info_dtor
)(type_info
*);
100 static char* (__thiscall
*ptype_info_raw_name
)(type_info
*);
101 static char* (__thiscall
*ptype_info_name
)(type_info
*);
102 static int (__thiscall
*ptype_info_before
)(type_info
*,type_info
*);
103 static int (__thiscall
*ptype_info_opequals_equals
)(type_info
*,type_info
*);
104 static int (__thiscall
*ptype_info_opnot_equals
)(type_info
*,type_info
*);
107 static type_info
* (__cdecl
*p__RTtypeid
)(void*);
108 static void* (__cdecl
*p__RTCastToVoid
)(void*);
109 static void* (__cdecl
*p__RTDynamicCast
)(void*,int,void*,void*,int);
112 static char* (__cdecl
*p__unDName
)(char*,const char*,int,void*,void*,unsigned short int);
115 /* _very_ early native versions have serious RTTI bugs, so we check */
116 static void* bAncientVersion
;
118 /* Emulate a __thiscall */
121 #include "pshpack1.h"
122 struct thiscall_thunk
124 BYTE pop_eax
; /* popl %eax (ret addr) */
125 BYTE pop_edx
; /* popl %edx (func) */
126 BYTE pop_ecx
; /* popl %ecx (this) */
127 BYTE push_eax
; /* pushl %eax */
128 WORD jmp_edx
; /* jmp *%edx */
132 static void * (WINAPI
*call_thiscall_func1
)( void *func
, void *this );
133 static void * (WINAPI
*call_thiscall_func2
)( void *func
, void *this, const void *a
);
135 static void init_thiscall_thunk(void)
137 struct thiscall_thunk
*thunk
= VirtualAlloc( NULL
, sizeof(*thunk
),
138 MEM_COMMIT
, PAGE_EXECUTE_READWRITE
);
139 thunk
->pop_eax
= 0x58; /* popl %eax */
140 thunk
->pop_edx
= 0x5a; /* popl %edx */
141 thunk
->pop_ecx
= 0x59; /* popl %ecx */
142 thunk
->push_eax
= 0x50; /* pushl %eax */
143 thunk
->jmp_edx
= 0xe2ff; /* jmp *%edx */
144 call_thiscall_func1
= (void *)thunk
;
145 call_thiscall_func2
= (void *)thunk
;
148 #define call_func1(func,_this) call_thiscall_func1(func,_this)
149 #define call_func2(func,_this,a) call_thiscall_func2(func,_this,(const void*)a)
153 #define init_thiscall_thunk() do { } while(0)
154 #define call_func1(func,_this) func(_this)
155 #define call_func2(func,_this,a) func(_this,a)
157 #endif /* __i386__ */
159 /* Some exports are only available in later versions */
160 #define SETNOFAIL(x,y) x = (void*)GetProcAddress(hMsvcrt,y)
161 #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
163 static BOOL
InitFunctionPtrs(void)
165 hMsvcrt
= GetModuleHandleA("msvcrt.dll");
167 hMsvcrt
= GetModuleHandleA("msvcrtd.dll");
168 ok(hMsvcrt
!= 0, "GetModuleHandleA failed\n");
171 win_skip("Could not load msvcrt.dll\n");
175 SET(pmalloc
, "malloc");
178 SET(pexception_vtable
, "??_7exception@@6B@");
179 SET(pbad_typeid_vtable
, "??_7bad_typeid@@6B@");
180 SET(pbad_cast_vtable
, "??_7bad_cast@@6B@");
181 SET(p__non_rtti_object_vtable
, "??_7__non_rtti_object@@6B@");
183 SET(p__RTtypeid
, "__RTtypeid");
184 SET(p__RTCastToVoid
, "__RTCastToVoid");
185 SET(p__RTDynamicCast
, "__RTDynamicCast");
187 SET(p__unDName
,"__unDName");
189 /* Extremely early versions export logic_error, and crash in RTTI */
190 SETNOFAIL(bAncientVersion
, "??0logic_error@@QAE@ABQBD@Z");
191 if (sizeof(void *) > sizeof(int)) /* 64-bit initialization */
193 SETNOFAIL(poperator_new
, "??_U@YAPEAX_K@Z");
194 SETNOFAIL(poperator_delete
, "??_V@YAXPEAX@Z");
196 SET(pexception_ctor
, "??0exception@@QEAA@AEBQEBD@Z");
197 SET(pexception_copy_ctor
, "??0exception@@QEAA@AEBV0@@Z");
198 SET(pexception_default_ctor
, "??0exception@@QEAA@XZ");
199 SET(pexception_dtor
, "??1exception@@UEAA@XZ");
200 SET(pexception_opequals
, "??4exception@@QEAAAEAV0@AEBV0@@Z");
201 SET(pexception_what
, "?what@exception@@UEBAPEBDXZ");
202 pexception_vector_dtor
= (void*)pexception_vtable
[0];
203 pexception_scalar_dtor
= (void*)pexception_vtable
[0];
205 SET(pbad_typeid_ctor
, "??0bad_typeid@@QEAA@PEBD@Z");
206 SETNOFAIL(pbad_typeid_ctor_closure
, "??_Fbad_typeid@@QEAAXXZ");
207 SET(pbad_typeid_copy_ctor
, "??0bad_typeid@@QEAA@AEBV0@@Z");
208 SET(pbad_typeid_dtor
, "??1bad_typeid@@UEAA@XZ");
209 SET(pbad_typeid_opequals
, "??4bad_typeid@@QEAAAEAV0@AEBV0@@Z");
210 SET(pbad_typeid_what
, "?what@exception@@UEBAPEBDXZ");
211 pbad_typeid_vector_dtor
= (void*)pbad_typeid_vtable
[0];
212 pbad_typeid_scalar_dtor
= (void*)pbad_typeid_vtable
[0];
214 SET(pbad_cast_ctor
, "??0bad_cast@@QEAA@AEBQEBD@Z");
215 SET(pbad_cast_ctor2
, "??0bad_cast@@QEAA@PEBD@Z");
216 SET(pbad_cast_ctor_closure
, "??_Fbad_cast@@QEAAXXZ");
217 SET(pbad_cast_copy_ctor
, "??0bad_cast@@QEAA@AEBV0@@Z");
218 SET(pbad_cast_dtor
, "??1bad_cast@@UEAA@XZ");
219 SET(pbad_cast_opequals
, "??4bad_cast@@QEAAAEAV0@AEBV0@@Z");
220 SET(pbad_cast_what
, "?what@exception@@UEBAPEBDXZ");
221 pbad_cast_vector_dtor
= (void*)pbad_cast_vtable
[0];
222 pbad_cast_scalar_dtor
= (void*)pbad_cast_vtable
[0];
224 SET(p__non_rtti_object_ctor
, "??0__non_rtti_object@@QEAA@PEBD@Z");
225 SET(p__non_rtti_object_copy_ctor
, "??0__non_rtti_object@@QEAA@AEBV0@@Z");
226 SET(p__non_rtti_object_dtor
, "??1__non_rtti_object@@UEAA@XZ");
227 SET(p__non_rtti_object_opequals
, "??4__non_rtti_object@@QEAAAEAV0@AEBV0@@Z");
228 SET(p__non_rtti_object_what
, "?what@exception@@UEBAPEBDXZ");
229 p__non_rtti_object_vector_dtor
= (void*)p__non_rtti_object_vtable
[0];
230 p__non_rtti_object_scalar_dtor
= (void*)p__non_rtti_object_vtable
[0];
232 SET(ptype_info_dtor
, "??1type_info@@UEAA@XZ");
233 SET(ptype_info_raw_name
, "?raw_name@type_info@@QEBAPEBDXZ");
234 SET(ptype_info_name
, "?name@type_info@@QEBAPEBDXZ");
235 SET(ptype_info_before
, "?before@type_info@@QEBAHAEBV1@@Z");
236 SET(ptype_info_opequals_equals
, "??8type_info@@QEBAHAEBV0@@Z");
237 SET(ptype_info_opnot_equals
, "??9type_info@@QEBAHAEBV0@@Z");
241 SETNOFAIL(poperator_new
, "??_U@YAPAXI@Z");
242 SETNOFAIL(poperator_delete
, "??_V@YAXPAX@Z");
244 SET(pexception_ctor
, "??0exception@@QAE@ABQBD@Z");
245 SET(pexception_copy_ctor
, "??0exception@@QAE@ABV0@@Z");
246 SET(pexception_default_ctor
, "??0exception@@QAE@XZ");
247 SET(pexception_dtor
, "??1exception@@UAE@XZ");
248 SET(pexception_opequals
, "??4exception@@QAEAAV0@ABV0@@Z");
249 SET(pexception_what
, "?what@exception@@UBEPBDXZ");
250 SET(pexception_vector_dtor
, "??_Eexception@@UAEPAXI@Z");
251 SET(pexception_scalar_dtor
, "??_Gexception@@UAEPAXI@Z");
253 SET(pbad_typeid_ctor
, "??0bad_typeid@@QAE@PBD@Z");
254 SETNOFAIL(pbad_typeid_ctor_closure
, "??_Fbad_typeid@@QAEXXZ");
255 SET(pbad_typeid_copy_ctor
, "??0bad_typeid@@QAE@ABV0@@Z");
256 SET(pbad_typeid_dtor
, "??1bad_typeid@@UAE@XZ");
257 SET(pbad_typeid_opequals
, "??4bad_typeid@@QAEAAV0@ABV0@@Z");
258 SET(pbad_typeid_what
, "?what@exception@@UBEPBDXZ");
259 SET(pbad_typeid_vector_dtor
, "??_Ebad_typeid@@UAEPAXI@Z");
260 SET(pbad_typeid_scalar_dtor
, "??_Gbad_typeid@@UAEPAXI@Z");
262 SETNOFAIL(pbad_cast_ctor
, "??0bad_cast@@QAE@ABQBD@Z");
264 SET(pbad_cast_ctor
, "??0bad_cast@@AAE@PBQBD@Z");
265 SETNOFAIL(pbad_cast_ctor2
, "??0bad_cast@@QAE@PBD@Z");
266 SETNOFAIL(pbad_cast_ctor_closure
, "??_Fbad_cast@@QAEXXZ");
267 SET(pbad_cast_copy_ctor
, "??0bad_cast@@QAE@ABV0@@Z");
268 SET(pbad_cast_dtor
, "??1bad_cast@@UAE@XZ");
269 SET(pbad_cast_opequals
, "??4bad_cast@@QAEAAV0@ABV0@@Z");
270 SET(pbad_cast_what
, "?what@exception@@UBEPBDXZ");
271 SET(pbad_cast_vector_dtor
, "??_Ebad_cast@@UAEPAXI@Z");
272 SET(pbad_cast_scalar_dtor
, "??_Gbad_cast@@UAEPAXI@Z");
274 SET(p__non_rtti_object_ctor
, "??0__non_rtti_object@@QAE@PBD@Z");
275 SET(p__non_rtti_object_copy_ctor
, "??0__non_rtti_object@@QAE@ABV0@@Z");
276 SET(p__non_rtti_object_dtor
, "??1__non_rtti_object@@UAE@XZ");
277 SET(p__non_rtti_object_opequals
, "??4__non_rtti_object@@QAEAAV0@ABV0@@Z");
278 SET(p__non_rtti_object_what
, "?what@exception@@UBEPBDXZ");
279 SET(p__non_rtti_object_vector_dtor
, "??_E__non_rtti_object@@UAEPAXI@Z");
280 SET(p__non_rtti_object_scalar_dtor
, "??_G__non_rtti_object@@UAEPAXI@Z");
282 SET(ptype_info_dtor
, "??1type_info@@UAE@XZ");
283 SET(ptype_info_raw_name
, "?raw_name@type_info@@QBEPBDXZ");
284 SET(ptype_info_name
, "?name@type_info@@QBEPBDXZ");
285 SET(ptype_info_before
, "?before@type_info@@QBEHABV1@@Z");
286 SET(ptype_info_opequals_equals
, "??8type_info@@QBEHABV0@@Z");
287 SET(ptype_info_opnot_equals
, "??9type_info@@QBEHABV0@@Z");
291 poperator_new
= pmalloc
;
292 if (!poperator_delete
)
293 poperator_delete
= pfree
;
295 init_thiscall_thunk();
299 static void test_exception(void)
301 static const char* e_name
= "An exception name";
303 exception e
, e2
, e3
, *pe
;
305 if (!poperator_new
|| !poperator_delete
||
306 !pexception_ctor
|| !pexception_copy_ctor
|| !pexception_default_ctor
||
307 !pexception_dtor
|| !pexception_opequals
|| !pexception_what
||
308 !pexception_vtable
|| !pexception_vector_dtor
|| !pexception_scalar_dtor
)
311 /* 'const char*&' ctor */
312 memset(&e
, 0, sizeof(e
));
313 call_func2(pexception_ctor
, &e
, &e_name
);
314 ok(e
.vtable
!= NULL
, "Null exception vtable for e\n");
315 ok(e
.name
&& e
.name
!= e_name
&& !strcmp(e
.name
, "An exception name"), "Bad name '%s' for e\n", e
.name
);
316 ok(e
.do_free
== 1, "do_free set to %d for e\n", e
.do_free
);
319 memset(&e2
, 0, sizeof(e2
));
320 call_func2(pexception_copy_ctor
, &e2
, &e
);
321 ok(e2
.vtable
!= NULL
, "Null exception vtable for e2\n");
322 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "An exception name"), "Bad exception name for e2\n");
323 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
326 memset(&e3
, 1, sizeof(e3
));
327 call_func1(pexception_default_ctor
, &e3
);
328 ok(e3
.vtable
!= NULL
, "Null exception vtable for e3\n");
329 ok(e3
.name
== NULL
, "Bad exception name for e3\n");
330 ok(e3
.do_free
== 0, "do_free set to %d for e3\n", e3
.do_free
);
332 ok(e
.vtable
== e2
.vtable
&& e
.vtable
== e3
.vtable
, "exception vtables differ!\n");
334 /* Test calling the dtors */
335 call_func1(pexception_dtor
, &e2
);
336 call_func1(pexception_dtor
, &e3
);
338 /* Operator equals */
339 memset(&e2
, 0, sizeof(e2
));
340 call_func1(pexception_default_ctor
, &e2
);
341 pe
= call_func2(pexception_opequals
, &e2
, &e
);
342 ok(e2
.vtable
!= NULL
, "Null exception vtable for e2\n");
343 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "An exception name"), "Bad exception name for e2\n");
344 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
345 ok(pe
== &e2
, "opequals didn't return e2\n");
348 name
= call_func1(pexception_what
, &e2
);
349 ok(e2
.name
== name
, "Bad exception name from e2::what()\n");
352 ok(e2
.vtable
== pexception_vtable
, "Bad vtable for e2\n");
353 call_func1(pexception_dtor
, &e2
);
356 pe
= poperator_new(sizeof(exception
));
357 ok(pe
!= NULL
, "new() failed\n");
360 call_func2(pexception_ctor
, pe
, &e_name
);
362 call_func2(pexception_scalar_dtor
, pe
, 0); /* Shouldn't delete pe */
365 call_func2(pexception_scalar_dtor
, pe
, 1); /* Should delete pe */
368 pe
= poperator_new(sizeof(exception
));
369 ok(pe
!= NULL
, "new() failed\n");
372 /* vector dtor, single element */
373 call_func2(pexception_ctor
, pe
, &e_name
);
374 call_func2(pexception_vector_dtor
, pe
, 1); /* Should delete pe as single element*/
377 pe
= poperator_new(sizeof(exception
) * 4 + sizeof(size_t));
378 ok(pe
!= NULL
, "new() failed\n");
381 /* vector dtor, multiple elements */
382 char name
[] = "a constant";
384 pe
= (exception
*)((size_t*)pe
+ 1);
385 call_func2(pexception_ctor
, &pe
[0], &e_name
);
386 call_func2(pexception_ctor
, &pe
[1], &e_name
);
387 call_func2(pexception_ctor
, &pe
[2], &e_name
);
389 pe
[3].do_free
= 1; /* Crash if we try to free this */
390 call_func2(pexception_vector_dtor
, pe
, 3); /* Should delete all 3 and then pe block */
393 /* test our exported vtable is kosher */
394 pe
= (void*)pexception_vtable
; /* Use the exception struct to get vtable ptrs */
395 pexception_vector_dtor
= (void*)pe
->vtable
;
396 pexception_what
= (void*)pe
->name
;
398 name
= call_func1(pexception_what
, &e
);
399 ok(e
.name
== name
, "Bad exception name from vtable e::what()\n");
401 if (p__RTtypeid
&& !bAncientVersion
)
404 type_info
*ti
= p__RTtypeid(&e
);
405 ok (ti
&& ti
->mangled
&&
406 !strcmp(ti
->mangled
, ".?AVexception@@"), "bad rtti for e\n");
410 /* Check the returned type_info has rtti too */
411 type_info
*ti2
= p__RTtypeid(ti
);
412 ok (ti2
!= NULL
&& !strcmp(ti2
->mangled
, ".?AVtype_info@@"), "bad rtti for e's type_info\n");
416 call_func2(pexception_vector_dtor
, &e
, 0); /* Should delete e.name, but not e */
419 /* This test is basically a cut 'n' paste of the exception test. but it verifies that
420 * bad_typeid works the exact same way... */
421 static void test_bad_typeid(void)
423 static const char* e_name
= "A bad_typeid name";
425 exception e
, e2
, e3
, *pe
;
427 if (!poperator_new
|| !poperator_delete
||
428 !pbad_typeid_ctor
|| !pbad_typeid_copy_ctor
||
429 !pbad_typeid_dtor
|| !pbad_typeid_opequals
|| !pbad_typeid_what
||
430 !pbad_typeid_vtable
|| !pbad_typeid_vector_dtor
|| !pbad_typeid_scalar_dtor
)
433 /* 'const char*' ctor */
434 memset(&e
, 0, sizeof(e
));
435 call_func2(pbad_typeid_ctor
, &e
, e_name
);
436 ok(e
.vtable
!= NULL
, "Null bad_typeid vtable for e\n");
437 ok(e
.name
&& e
.name
!= e_name
&& !strcmp(e
.name
, "A bad_typeid name"), "Bad name '%s' for e\n", e
.name
);
438 ok(e
.do_free
== 1, "do_free set to %d for e\n", e
.do_free
);
441 memset(&e2
, 0, sizeof(e2
));
442 call_func2(pbad_typeid_copy_ctor
, &e2
, &e
);
443 ok(e2
.vtable
!= NULL
, "Null bad_typeid vtable for e2\n");
444 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "A bad_typeid name"), "Bad name '%s' for e2\n", e2
.name
);
445 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
448 if (pbad_typeid_ctor_closure
)
450 memset(&e3
, 1, sizeof(e3
));
451 call_func1(pbad_typeid_ctor_closure
, &e3
);
452 ok(e3
.vtable
!= NULL
, "Null bad_typeid vtable for e3\n");
453 ok(e3
.name
&& !strcmp(e3
.name
, "bad typeid"), "Bad bad_typeid name for e3\n");
454 ok(e3
.do_free
== 1, "do_free set to %d for e3\n", e3
.do_free
);
455 ok(e
.vtable
== e3
.vtable
, "bad_typeid closure vtables differ!\n");
456 call_func1(pbad_typeid_dtor
, &e3
);
458 ok(e
.vtable
== e2
.vtable
, "bad_typeid vtables differ!\n");
460 /* Test calling the dtors */
461 call_func1(pbad_typeid_dtor
, &e2
);
463 /* Operator equals */
464 memset(&e2
, 1, sizeof(e2
));
465 call_func1(pexception_default_ctor
, &e2
);
466 pe
= call_func2(pbad_typeid_opequals
, &e2
, &e
);
467 ok(e2
.vtable
!= NULL
, "Null bad_typeid vtable for e2\n");
468 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "A bad_typeid name"), "Bad bad_typeid name for e2\n");
469 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
470 ok(pe
== &e2
, "opequals didn't return e2\n");
473 name
= call_func1(pbad_typeid_what
, &e2
);
474 ok(e2
.name
== name
, "Bad bad_typeid name from e2::what()\n");
477 ok(e2
.vtable
== pexception_vtable
, "Bad vtable for e2\n");
478 call_func1(pbad_typeid_dtor
, &e2
);
481 pe
= poperator_new(sizeof(exception
));
482 ok(pe
!= NULL
, "new() failed\n");
485 call_func2(pbad_typeid_ctor
, pe
, e_name
);
487 call_func2(pbad_typeid_scalar_dtor
, pe
, 0); /* Shouldn't delete pe */
490 call_func2(pbad_typeid_scalar_dtor
, pe
, 1); /* Should delete pe */
493 pe
= poperator_new(sizeof(exception
));
494 ok(pe
!= NULL
, "new() failed\n");
497 /* vector dtor, single element */
498 call_func2(pbad_typeid_ctor
, pe
, e_name
);
499 call_func2(pbad_typeid_vector_dtor
, pe
, 1); /* Should delete pe as single element*/
502 pe
= poperator_new(sizeof(exception
) * 4 + sizeof(size_t));
503 ok(pe
!= NULL
, "new() failed\n");
506 /* vector dtor, multiple elements */
508 pe
= (exception
*)((size_t*)pe
+ 1);
509 call_func2(pbad_typeid_ctor
, &pe
[0], e_name
);
510 call_func2(pbad_typeid_ctor
, &pe
[1], e_name
);
511 call_func2(pbad_typeid_ctor
, &pe
[2], e_name
);
513 pe
[3].do_free
= 1; /* Crash if we try to free this element */
514 call_func2(pbad_typeid_vector_dtor
, pe
, 3); /* Should delete all 3 and then pe block */
517 /* test our exported vtable is kosher */
518 pe
= (void*)pbad_typeid_vtable
; /* Use the exception struct to get vtable ptrs */
519 pbad_typeid_vector_dtor
= (void*)pe
->vtable
;
520 pbad_typeid_what
= (void*)pe
->name
;
522 name
= call_func1(pbad_typeid_what
, &e
);
523 ok(e
.name
== name
, "Bad bad_typeid name from vtable e::what()\n");
525 if (p__RTtypeid
&& !bAncientVersion
)
528 type_info
*ti
= p__RTtypeid(&e
);
529 ok (ti
!= NULL
&& !strcmp(ti
->mangled
, ".?AVbad_typeid@@"), "bad rtti for e (%s)\n",
530 !ti
? "null" : ti
->mangled
);
533 call_func2(pbad_typeid_vector_dtor
, &e
, 0); /* Should delete e.name, but not e */
537 /* Ditto for this test... */
538 static void test_bad_cast(void)
540 static const char* e_name
= "A bad_cast name";
542 exception e
, e2
, e3
, *pe
;
544 if (!poperator_new
|| !poperator_delete
||
545 !pbad_cast_ctor
|| !pbad_cast_copy_ctor
||
546 !pbad_cast_dtor
|| !pbad_cast_opequals
|| !pbad_cast_what
||
547 !pbad_cast_vtable
|| !pbad_cast_vector_dtor
|| !pbad_cast_scalar_dtor
)
552 /* 'const char*' ctor */
553 memset(&e
, 0, sizeof(e
));
554 call_func2(pbad_cast_ctor2
, &e
, e_name
);
555 ok(e
.vtable
!= NULL
, "Null bad_cast vtable for e\n");
556 ok(e
.name
&& e
.name
!= e_name
&& !strcmp(e
.name
, "A bad_cast name"), "Bad name '%s' for e\n", e
.name
);
557 ok(e
.do_free
== 1, "do_free set to %d for e\n", e
.do_free
);
558 call_func1(pbad_cast_dtor
, &e
);
561 /* 'const char*&' ctor */
562 memset(&e
, 0, sizeof(e
));
563 call_func2(pbad_cast_ctor
, &e
, &e_name
);
564 ok(e
.vtable
!= NULL
, "Null bad_cast vtable for e\n");
565 ok(e
.name
&& e
.name
!= e_name
&& !strcmp(e
.name
, "A bad_cast name"), "Bad name '%s' for e\n", e
.name
);
566 ok(e
.do_free
== 1, "do_free set to %d for e\n", e
.do_free
);
569 memset(&e2
, 0, sizeof(e2
));
570 call_func2(pbad_cast_copy_ctor
, &e2
, &e
);
571 ok(e2
.vtable
!= NULL
, "Null bad_cast vtable for e2\n");
572 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "A bad_cast name"), "Bad name '%s' for e2\n", e2
.name
);
573 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
576 if (pbad_cast_ctor_closure
)
578 memset(&e3
, 1, sizeof(e3
));
579 call_func1(pbad_cast_ctor_closure
, &e3
);
580 ok(e3
.vtable
!= NULL
, "Null bad_cast vtable for e3\n");
581 ok(e3
.name
&& !strcmp(e3
.name
, "bad cast"), "Bad bad_cast name for e3\n");
582 ok(e3
.do_free
== 1, "do_free set to %d for e3\n", e3
.do_free
);
583 ok(e
.vtable
== e3
.vtable
, "bad_cast closure vtables differ!\n");
584 call_func1(pbad_cast_dtor
, &e3
);
586 ok(e
.vtable
== e2
.vtable
, "bad_cast vtables differ!\n");
588 /* Test calling the dtors */
589 call_func1(pbad_cast_dtor
, &e2
);
591 /* Operator equals */
592 memset(&e2
, 1, sizeof(e2
));
593 call_func1(pexception_default_ctor
, &e2
);
594 pe
= call_func2(pbad_cast_opequals
, &e2
, &e
);
595 ok(e2
.vtable
!= NULL
, "Null bad_cast vtable for e2\n");
596 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "A bad_cast name"), "Bad bad_cast name for e2\n");
597 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
598 ok(pe
== &e2
, "opequals didn't return e2\n");
601 name
= call_func1(pbad_cast_what
, &e2
);
602 ok(e2
.name
== name
, "Bad bad_cast name from e2::what()\n");
605 ok(e2
.vtable
== pexception_vtable
, "Bad vtable for e2\n");
606 call_func1(pbad_cast_dtor
, &e2
);
609 pe
= poperator_new(sizeof(exception
));
610 ok(pe
!= NULL
, "new() failed\n");
613 call_func2(pbad_cast_ctor
, pe
, &e_name
);
615 call_func2(pbad_cast_scalar_dtor
, pe
, 0); /* Shouldn't delete pe */
618 call_func2(pbad_cast_scalar_dtor
, pe
, 1); /* Should delete pe */
621 pe
= poperator_new(sizeof(exception
));
622 ok(pe
!= NULL
, "new() failed\n");
625 /* vector dtor, single element */
626 call_func2(pbad_cast_ctor
, pe
, &e_name
);
627 call_func2(pbad_cast_vector_dtor
, pe
, 1); /* Should delete pe as single element*/
630 pe
= poperator_new(sizeof(exception
) * 4 + sizeof(size_t));
631 ok(pe
!= NULL
, "new() failed\n");
634 /* vector dtor, multiple elements */
636 pe
= (exception
*)((size_t*)pe
+ 1);
637 call_func2(pbad_cast_ctor
, &pe
[0], &e_name
);
638 call_func2(pbad_cast_ctor
, &pe
[1], &e_name
);
639 call_func2(pbad_cast_ctor
, &pe
[2], &e_name
);
641 pe
[3].do_free
= 1; /* Crash if we try to free this element */
642 call_func2(pbad_cast_vector_dtor
, pe
, 3); /* Should delete all 3 and then pe block */
645 /* test our exported vtable is kosher */
646 pe
= (void*)pbad_cast_vtable
; /* Use the exception struct to get vtable ptrs */
647 pbad_cast_vector_dtor
= (void*)pe
->vtable
;
648 pbad_cast_what
= (void*)pe
->name
;
650 name
= call_func1(pbad_cast_what
, &e
);
651 ok(e
.name
== name
, "Bad bad_cast name from vtable e::what()\n");
653 if (p__RTtypeid
&& !bAncientVersion
)
656 type_info
*ti
= p__RTtypeid(&e
);
657 ok (ti
!= NULL
&& !strcmp(ti
->mangled
, ".?AVbad_cast@@"), "bad rtti for e\n");
659 call_func2(pbad_cast_vector_dtor
, &e
, 0); /* Should delete e.name, but not e */
662 /* ... and this one */
663 static void test___non_rtti_object(void)
665 static const char* e_name
= "A __non_rtti_object name";
667 exception e
, e2
, *pe
;
669 if (!poperator_new
|| !poperator_delete
||
670 !p__non_rtti_object_ctor
|| !p__non_rtti_object_copy_ctor
||
671 !p__non_rtti_object_dtor
|| !p__non_rtti_object_opequals
|| !p__non_rtti_object_what
||
672 !p__non_rtti_object_vtable
|| !p__non_rtti_object_vector_dtor
|| !p__non_rtti_object_scalar_dtor
)
675 /* 'const char*' ctor */
676 memset(&e
, 0, sizeof(e
));
677 call_func2(p__non_rtti_object_ctor
, &e
, e_name
);
678 ok(e
.vtable
!= NULL
, "Null __non_rtti_object vtable for e\n");
679 ok(e
.name
&& e
.name
!= e_name
&& !strcmp(e
.name
, "A __non_rtti_object name"), "Bad name '%s' for e\n", e
.name
);
680 ok(e
.do_free
== 1, "do_free set to %d for e\n", e
.do_free
);
683 memset(&e2
, 0, sizeof(e2
));
684 call_func2(p__non_rtti_object_copy_ctor
, &e2
, &e
);
685 ok(e2
.vtable
!= NULL
, "Null __non_rtti_object vtable for e2\n");
686 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "A __non_rtti_object name"), "Bad name '%s' for e2\n", e2
.name
);
687 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
688 ok(e
.vtable
== e2
.vtable
, "__non_rtti_object vtables differ!\n");
690 /* Test calling the dtors */
691 call_func1(p__non_rtti_object_dtor
, &e2
);
693 /* Operator equals */
694 memset(&e2
, 1, sizeof(e2
));
695 call_func1(pexception_default_ctor
, &e2
);
696 pe
= call_func2(p__non_rtti_object_opequals
, &e2
, &e
);
697 ok(e2
.vtable
!= NULL
, "Null __non_rtti_object vtable for e2\n");
698 ok(e2
.name
&& e2
.name
!= e
.name
&& !strcmp(e2
.name
, "A __non_rtti_object name"), "Bad __non_rtti_object name for e2\n");
699 ok(e2
.do_free
== 1, "do_free set to %d for e2\n", e2
.do_free
);
700 ok(pe
== &e2
, "opequals didn't return e2\n");
703 name
= call_func1(p__non_rtti_object_what
, &e2
);
704 ok(e2
.name
== name
, "Bad __non_rtti_object name from e2::what()\n");
707 ok(e2
.vtable
== pexception_vtable
, "Bad vtable for e2\n");
708 call_func1(p__non_rtti_object_dtor
, &e2
);
711 pe
= poperator_new(sizeof(exception
));
712 ok(pe
!= NULL
, "new() failed\n");
715 call_func2(p__non_rtti_object_ctor
, pe
, e_name
);
717 call_func2(p__non_rtti_object_scalar_dtor
, pe
, 0); /* Shouldn't delete pe */
720 call_func2(p__non_rtti_object_scalar_dtor
, pe
, 1); /* Should delete pe */
723 pe
= poperator_new(sizeof(exception
));
724 ok(pe
!= NULL
, "new() failed\n");
727 /* vector dtor, single element */
728 call_func2(p__non_rtti_object_ctor
, pe
, e_name
);
729 call_func2(p__non_rtti_object_vector_dtor
, pe
, 1); /* Should delete pe as single element*/
732 pe
= poperator_new(sizeof(exception
) * 4 + sizeof(size_t));
733 ok(pe
!= NULL
, "new() failed\n");
736 /* vector dtor, multiple elements */
738 pe
= (exception
*)((size_t*)pe
+ 1);
739 call_func2(p__non_rtti_object_ctor
, &pe
[0], e_name
);
740 call_func2(p__non_rtti_object_ctor
, &pe
[1], e_name
);
741 call_func2(p__non_rtti_object_ctor
, &pe
[2], e_name
);
743 pe
[3].do_free
= 1; /* Crash if we try to free this element */
744 call_func2(p__non_rtti_object_vector_dtor
, pe
, 3); /* Should delete all 3 and then pe block */
747 /* test our exported vtable is kosher */
748 pe
= (void*)p__non_rtti_object_vtable
; /* Use the exception struct to get vtable ptrs */
749 p__non_rtti_object_vector_dtor
= (void*)pe
->vtable
;
750 p__non_rtti_object_what
= (void*)pe
->name
;
752 name
= call_func1(p__non_rtti_object_what
, &e
);
753 ok(e
.name
== name
, "Bad __non_rtti_object name from vtable e::what()\n");
755 if (p__RTtypeid
&& !bAncientVersion
)
758 type_info
*ti
= p__RTtypeid(&e
);
759 ok (ti
!= NULL
&& !strcmp(ti
->mangled
, ".?AV__non_rtti_object@@"), "bad rtti for e\n");
761 call_func2(p__non_rtti_object_vector_dtor
, &e
, 0); /* Should delete e.name, but not e */
764 static void test_type_info(void)
766 static type_info t1
= { NULL
, NULL
,{'.','?','A','V','t','e','s','t','1','@','@',0,0,0,0,0 } };
767 static type_info t1_1
= { NULL
, NULL
,{'?','?','A','V','t','e','s','t','1','@','@',0,0,0,0,0 } };
768 static type_info t2
= { NULL
, NULL
, {'.','?','A','V','t','e','s','t','2','@','@',0,0,0,0,0 } };
772 if (!pmalloc
|| !pfree
|| !ptype_info_dtor
|| !ptype_info_raw_name
||
773 !ptype_info_name
|| !ptype_info_before
||
774 !ptype_info_opequals_equals
|| !ptype_info_opnot_equals
)
777 /* Test calling the dtors */
778 call_func1(ptype_info_dtor
, &t1
); /* No effect, since name is NULL */
779 t1
.name
= pmalloc(64);
780 strcpy(t1
.name
, "foo");
781 call_func1(ptype_info_dtor
, &t1
); /* Frees t1.name using 'free' */
785 name
= call_func1(ptype_info_raw_name
, &t1
);
787 /* FIXME: This fails on native; it shouldn't though - native bug?
788 * ok(name && !strcmp(name, t1.mangled), "bad raw_name '%s' for t1 (expected '%s')\n", name, t1.mangled);
790 ok(t1
.name
== NULL
, "raw_name() set name for t1\n");
794 name
= call_func1(ptype_info_name
, &t1
);
795 ok(name
&& t1
.name
&& !strcmp(name
, t1
.name
), "bad name '%s' for t1\n", name
);
797 ok(t1
.name
&& !strcmp(t1
.name
, "class test1"), "demangled to '%s' for t1\n", t1
.name
);
798 call_func1(ptype_info_dtor
, &t1
);
802 res
= (int)call_func2(ptype_info_before
, &t1
, &t1
);
803 ok(res
== 0, "expected 0, got %d\n", res
);
804 res
= (int)call_func2(ptype_info_before
, &t2
, &t1
);
805 ok(res
== 0, "expected 0, got %d\n", res
);
806 res
= (int)call_func2(ptype_info_before
, &t1
, &t2
);
807 ok(res
== 1, "expected 1, got %d\n", res
);
808 /* Doesn't check first char */
809 res
= (int)call_func2(ptype_info_before
, &t1
, &t1_1
);
810 ok(res
== 0, "expected 0, got %d\n", res
);
812 /* opequals_equals */
814 res
= (int)call_func2(ptype_info_opequals_equals
, &t1
, &t1
);
815 ok(res
== 1, "expected 1, got %d\n", res
);
816 res
= (int)call_func2(ptype_info_opequals_equals
, &t1
, &t2
);
817 ok(res
== 0, "expected 0, got %d\n", res
);
818 res
= (int)call_func2(ptype_info_opequals_equals
, &t2
, &t1
);
819 ok(res
== 0, "expected 0, got %d\n", res
);
823 res
= (int)call_func2(ptype_info_opnot_equals
, &t1
, &t1
);
824 ok(res
== 0, "expected 0, got %d\n", res
);
825 res
= (int)call_func2(ptype_info_opnot_equals
, &t1
, &t2
);
826 ok(res
== 1, "expected 1, got %d\n", res
);
827 res
= (int)call_func2(ptype_info_opnot_equals
, &t2
, &t1
);
828 ok(res
== 1, "expected 1, got %d\n", res
);
831 /* Test RTTI functions */
832 static void test_rtti(void)
834 static const char* e_name
= "name";
839 if (bAncientVersion
||
840 !p__RTCastToVoid
|| !p__RTtypeid
|| !pexception_ctor
|| !pbad_typeid_ctor
841 || !p__RTDynamicCast
|| !pexception_dtor
|| !pbad_typeid_dtor
)
844 call_func2(pexception_ctor
, &e
, &e_name
);
845 call_func2(pbad_typeid_ctor
, &b
, e_name
);
847 /* dynamic_cast to void* */
848 casted
= p__RTCastToVoid(&e
);
849 ok (casted
== (void*)&e
, "failed cast to void\n");
851 /* dynamic_cast up */
852 ti
= p__RTtypeid(&e
);
853 bti
= p__RTtypeid(&b
);
855 casted
= p__RTDynamicCast(&b
, 0, NULL
, ti
, 0);
858 /* New versions do not allow this conversion due to compiler changes */
859 ok (casted
== (void*)&b
, "failed cast from bad_typeid to exception\n");
862 /* dynamic_cast down */
863 casted
= p__RTDynamicCast(&e
, 0, NULL
, bti
, 0);
864 ok (casted
== NULL
, "Cast succeeded\n");
866 call_func1(pexception_dtor
, &e
);
867 call_func1(pbad_typeid_dtor
, &b
);
876 static void test_demangle_datatype(void)
879 struct _demangle demangle
[]={
880 /* { "BlaBla"," ?? ::Bla", FALSE}, */
881 { "ABVVec4@ref2@dice@@","class dice::ref2::Vec4 const &",TRUE
},
882 { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0H@@@", "class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,7>", TRUE
},
883 { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HO@@@", "class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,126>",TRUE
},
884 { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HOA@@@", "class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,2016>",TRUE
},
885 { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HOAA@@@", "class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,32256>",TRUE
},
886 { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@", "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@", FALSE
},
887 /* { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@", "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@",FALSE}, */
889 int i
, num_test
= (sizeof(demangle
)/sizeof(struct _demangle
));
891 for (i
= 0; i
< num_test
; i
++)
893 name
= p__unDName(0, demangle
[i
].mangled
, 0, pmalloc
, pfree
, 0x2800);
894 if (demangle
[i
].test_in_wine
)
895 ok(name
!= NULL
&& !strcmp(name
,demangle
[i
].result
), "Got name \"%s\" for %d\n", name
, i
);
897 todo_wine
ok(name
!= NULL
&& !strcmp(name
,demangle
[i
].result
), "Got name %s for %d\n", name
, i
);
903 /* Compare two strings treating multiple spaces (' ', ascii 0x20) in s2
904 as single space. Needed for test_demangle as __unDName() returns sometimes
905 two spaces instead of one in some older native msvcrt dlls. */
906 static int strcmp_space(const char *s1
, const char *s2
)
908 const char* s2start
= s2
;
910 while (*s1
== *s2
&& *s1
) {
914 if (*s2
== ' ' && s2
> s2start
&& *(s2
- 1) == ' ')
918 } while (*s1
&& *s2
);
922 static void test_demangle(void)
924 static struct {const char* in
; const char* out
; const char *broken
; unsigned int flags
;} test
[] = {
925 /* 0 */ {"??0bad_alloc@std@@QAE@ABV01@@Z",
926 "public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)",
927 "public: __thiscall std::bad_alloc::bad_alloc(class bad_alloc::bad_alloc const &)"},
928 /* 1 */ {"??0bad_alloc@std@@QAE@PBD@Z",
929 "public: __thiscall std::bad_alloc::bad_alloc(char const *)"},
930 /* 2 */ {"??0bad_cast@@AAE@PBQBD@Z",
931 "private: __thiscall bad_cast::bad_cast(char const * const *)"},
932 /* 3 */ {"??0bad_cast@@QAE@ABQBD@Z",
933 "public: __thiscall bad_cast::bad_cast(char const * const &)"},
934 /* 4 */ {"??0bad_cast@@QAE@ABV0@@Z",
935 "public: __thiscall bad_cast::bad_cast(class bad_cast const &)"},
936 /* 5 */ {"??0bad_exception@std@@QAE@ABV01@@Z",
937 "public: __thiscall std::bad_exception::bad_exception(class std::bad_exception const &)",
938 "public: __thiscall std::bad_exception::bad_exception(class bad_exception::bad_exception const &)"},
939 /* 6 */ {"??0bad_exception@std@@QAE@PBD@Z",
940 "public: __thiscall std::bad_exception::bad_exception(char const *)"},
941 /* 7 */ {"??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z",
942 "public: __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::basic_filebuf<char,struct std::char_traits<char> >(class std::basic_filebuf<char,struct std::char_traits<char> > const &)",
943 "public: __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::basic_filebuf<char,struct std::char_traits<char> >(class basic_filebuf<char,struct std::char_traits<char> >::basic_filebuf<char,struct std::char_traits<char> > const &)"},
944 /* 8 */ {"??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z",
945 "public: __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::basic_filebuf<char,struct std::char_traits<char> >(struct _iobuf *)"},
946 /* 9 */ {"??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z",
947 "public: __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::basic_filebuf<char,struct std::char_traits<char> >(enum std::_Uninitialized)",
948 "public: __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::basic_filebuf<char,struct std::char_traits<char> >(enum basic_filebuf<char,struct std::char_traits<char> >::_Uninitialized)"},
949 /* 10 */ {"??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z",
950 "public: __thiscall std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >(class std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> > const &)",
951 "public: __thiscall std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >(class basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> > const &)"},
952 /* 11 */ {"??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z",
953 "public: __thiscall std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >(struct _iobuf *)"},
954 /* 12 */ {"??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z",
955 "public: __thiscall std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >(enum std::_Uninitialized)",
956 "public: __thiscall std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >(enum basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::_Uninitialized)"},
957 /* 13 */ {"??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z",
958 "public: __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > const &)",
959 "public: __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > const &)"},
960 /* 14 */ {"??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z",
961 "public: __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)",
962 "public: __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)"},
963 /* 15 */ {"??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z",
964 "public: __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)"},
965 /* 16 */ {"??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z",
966 "public: __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(class std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)",
967 "public: __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(class basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)"},
968 /* 17 */ {"??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z",
969 "public: __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,int)",
970 "public: __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(class basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,int)"},
971 /* 18 */ {"??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z",
972 "public: __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(int)"},
973 /* 19 */ {"??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z",
974 "public: __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >(class std::_Locinfo const &,unsigned int)",
975 "public: __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >(class num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::_Locinfo const &,unsigned int)"},
976 /* 20 */ {"??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z",
977 "public: __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >(unsigned int)"},
978 /* 21 */ {"??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z",
979 "public: __thiscall std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >(class std::_Locinfo const &,unsigned int)",
980 "public: __thiscall std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >(class num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::_Locinfo const &,unsigned int)"},
981 /* 22 */ {"??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z", "public: __thiscall std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >(unsigned int)"},
982 /* 23 */ {"??0streambuf@@QAE@ABV0@@Z", "public: __thiscall streambuf::streambuf(class streambuf const &)"},
983 /* 24 */ {"??0strstreambuf@@QAE@ABV0@@Z", "public: __thiscall strstreambuf::strstreambuf(class strstreambuf const &)"},
984 /* 25 */ {"??0strstreambuf@@QAE@H@Z", "public: __thiscall strstreambuf::strstreambuf(int)"},
985 /* 26 */ {"??0strstreambuf@@QAE@P6APAXJ@ZP6AXPAX@Z@Z", "public: __thiscall strstreambuf::strstreambuf(void * (__cdecl*)(long),void (__cdecl*)(void *))"},
986 /* 27 */ {"??0strstreambuf@@QAE@PADH0@Z", "public: __thiscall strstreambuf::strstreambuf(char *,int,char *)"},
987 /* 28 */ {"??0strstreambuf@@QAE@PAEH0@Z", "public: __thiscall strstreambuf::strstreambuf(unsigned char *,int,unsigned char *)"},
988 /* 29 */ {"??0strstreambuf@@QAE@XZ", "public: __thiscall strstreambuf::strstreambuf(void)"},
989 /* 30 */ {"??1__non_rtti_object@std@@UAE@XZ", "public: virtual __thiscall std::__non_rtti_object::~__non_rtti_object(void)"},
990 /* 31 */ {"??1__non_rtti_object@@UAE@XZ", "public: virtual __thiscall __non_rtti_object::~__non_rtti_object(void)"},
991 /* 32 */ {"??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ", "public: virtual __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::~num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >(void)"},
992 /* 33 */ {"??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ", "public: virtual __thiscall std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >::~num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >(void)"},
993 /* 34 */ {"??4istream_withassign@@QAEAAV0@ABV0@@Z", "public: class istream_withassign & __thiscall istream_withassign::operator=(class istream_withassign const &)"},
994 /* 35 */ {"??4istream_withassign@@QAEAAVistream@@ABV1@@Z", "public: class istream & __thiscall istream_withassign::operator=(class istream const &)"},
995 /* 36 */ {"??4istream_withassign@@QAEAAVistream@@PAVstreambuf@@@Z", "public: class istream & __thiscall istream_withassign::operator=(class streambuf *)"},
996 /* 37 */ {"??5std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z", "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl std::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,signed char &)"},
997 /* 38 */ {"??5std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z", "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl std::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,char &)"},
998 /* 39 */ {"??5std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z", "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl std::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,unsigned char &)"},
999 /* 40 */ {"??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z", "public: class std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> > & __thiscall std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >::operator<<(class std::ios_base & (__cdecl*)(class std::ios_base &))"},
1000 /* 41 */ {"??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z", "public: class std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> > & __thiscall std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >::operator<<(class std::basic_streambuf<unsigned short,struct std::char_traits<unsigned short> > *)"},
1001 /* 42 */ {"??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z", "public: class std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> > & __thiscall std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >::operator<<(void const *)"},
1002 /* 43 */ {"??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@", "const std::basic_fstream<char,struct std::char_traits<char> >::`vbtable'{for `std::basic_ostream<char,struct std::char_traits<char> >'}"},
1003 /* 44 */ {"??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@", "const std::basic_fstream<unsigned short,struct std::char_traits<unsigned short> >::`vbtable'{for `std::basic_istream<unsigned short,struct std::char_traits<unsigned short> >'}"},
1004 /* 45 */ {"??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@", "const std::basic_fstream<unsigned short,struct std::char_traits<unsigned short> >::`vbtable'{for `std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> >'}"},
1005 /* 46 */ {"??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z", "bool __cdecl std::operator!=(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"},
1006 /* 47 */ {"??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z", "bool __cdecl std::operator!=(unsigned short const *,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)"},
1007 /* 48 */ {"??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z", "public: char & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator[](unsigned int)"},
1008 /* 49 */ {"??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z", "public: char const & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator[](unsigned int)const "},
1009 /* 50 */ {"??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z", "public: unsigned short & __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::operator[](unsigned int)"},
1010 /* 51 */ {"??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z", "public: unsigned short const & __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::operator[](unsigned int)const "},
1011 /* 52 */ {"?abs@std@@YAMABV?$complex@M@1@@Z", "float __cdecl std::abs(class std::complex<float> const &)"},
1012 /* 53 */ {"?abs@std@@YANABV?$complex@N@1@@Z", "double __cdecl std::abs(class std::complex<double> const &)"},
1013 /* 54 */ {"?abs@std@@YAOABV?$complex@O@1@@Z", "long double __cdecl std::abs(class std::complex<long double> const &)"},
1014 /* 55 */ {"?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A", "class std::basic_istream<char,struct std::char_traits<char> > std::cin"},
1015 /* 56 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAG@Z", "protected: virtual class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,unsigned short &)const "},
1016 /* 57 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAI@Z", "protected: virtual class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,unsigned int &)const "},
1017 /* 58 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z", "protected: virtual class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,long &)const "},
1018 /* 59 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAK@Z", "protected: virtual class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,unsigned long &)const "},
1019 /* 60 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAM@Z", "protected: virtual class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,float &)const "},
1020 /* 61 */ {"?_query_new_handler@@YAP6AHI@ZXZ", "int (__cdecl*__cdecl _query_new_handler(void))(unsigned int)"},
1021 /* 62 */ {"?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z", "public: void __thiscall std::ios_base::register_callback(void (__cdecl*)(enum std::ios_base::event,class std::ios_base &,int),int)"},
1022 /* 63 */ {"?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z", "public: class std::basic_istream<char,struct std::char_traits<char> > & __thiscall std::basic_istream<char,struct std::char_traits<char> >::seekg(long,enum std::ios_base::seekdir)"},
1023 /* 64 */ {"?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z", "public: class std::basic_istream<char,struct std::char_traits<char> > & __thiscall std::basic_istream<char,struct std::char_traits<char> >::seekg(class std::fpos<int>)"},
1024 /* 65 */ {"?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z", "public: class std::basic_istream<unsigned short,struct std::char_traits<unsigned short> > & __thiscall std::basic_istream<unsigned short,struct std::char_traits<unsigned short> >::seekg(long,enum std::ios_base::seekdir)"},
1025 /* 66 */ {"?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z", "public: class std::basic_istream<unsigned short,struct std::char_traits<unsigned short> > & __thiscall std::basic_istream<unsigned short,struct std::char_traits<unsigned short> >::seekg(class std::fpos<int>)"},
1026 /* 67 */ {"?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z", "protected: virtual class std::fpos<int> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(long,enum std::ios_base::seekdir,int)"},
1027 /* 68 */ {"?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z", "protected: virtual class std::fpos<int> __thiscall std::basic_filebuf<unsigned short,struct std::char_traits<unsigned short> >::seekoff(long,enum std::ios_base::seekdir,int)"},
1028 /* 69 */ {"?set_new_handler@@YAP6AXXZP6AXXZ@Z", "void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void)"},
1029 /* 70 */ {"?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_istringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"},
1030 /* 71 */ {"?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_istringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const "},
1031 /* 72 */ {"?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_istringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)"},
1032 /* 73 */ {"?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall std::basic_istringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(void)const "},
1033 /* 74 */ {"?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"},
1034 /* 75 */ {"?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const "},
1035 /* 76 */ {"?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_ostringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)"},
1036 /* 77 */ {"?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall std::basic_ostringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(void)const "},
1037 /* 78 */ {"?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_stringbuf<char,struct std::char_traits<char>,class std::allocator<char> >::str(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"},
1038 /* 79 */ {"?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_stringbuf<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const "},
1039 /* 80 */ {"?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_stringbuf<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)"},
1040 /* 81 */ {"?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall std::basic_stringbuf<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(void)const "},
1041 /* 82 */ {"?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"},
1042 /* 83 */ {"?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const "},
1043 /* 84 */ {"?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)"},
1044 /* 85 */ {"?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > __thiscall std::basic_stringstream<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::str(void)const "},
1045 /* 86 */ {"?_Sync@ios_base@std@@0_NA", "private: static bool std::ios_base::_Sync"},
1046 /* 87 */ {"??_U@YAPAXI@Z", "void * __cdecl operator new[](unsigned int)"},
1047 /* 88 */ {"??_V@YAXPAX@Z", "void __cdecl operator delete[](void *)"},
1048 /* 89 */ {"??X?$_Complex_base@M@std@@QAEAAV01@ABM@Z", "public: class std::_Complex_base<float> & __thiscall std::_Complex_base<float>::operator*=(float const &)"},
1049 /* 90 */ {"??Xstd@@YAAAV?$complex@M@0@AAV10@ABV10@@Z", "class std::complex<float> & __cdecl std::operator*=(class std::complex<float> &,class std::complex<float> const &)"},
1050 /* 91 */ {"?aaa@@YAHAAUbbb@@@Z", "int __cdecl aaa(struct bbb &)"},
1051 /* 92 */ {"?aaa@@YAHBAUbbb@@@Z", "int __cdecl aaa(struct bbb & volatile)"},
1052 /* 93 */ {"?aaa@@YAHPAUbbb@@@Z", "int __cdecl aaa(struct bbb *)"},
1053 /* 94 */ {"?aaa@@YAHQAUbbb@@@Z", "int __cdecl aaa(struct bbb * const)"},
1054 /* 95 */ {"?aaa@@YAHRAUbbb@@@Z", "int __cdecl aaa(struct bbb * volatile)"},
1055 /* 96 */ {"?aaa@@YAHSAUbbb@@@Z", "int __cdecl aaa(struct bbb * const volatile)"},
1056 /* 97 */ {"??0aa.a@@QAE@XZ", "??0aa.a@@QAE@XZ"},
1057 /* 98 */ {"??0aa$_3a@@QAE@XZ", "public: __thiscall aa$_3a::aa$_3a(void)"},
1058 /* 99 */ {"??2?$aaa@AAUbbb@@AAUccc@@AAU2@@ddd@1eee@2@QAEHXZ", "public: int __thiscall eee::eee::ddd::ddd::aaa<struct bbb &,struct ccc &,struct ccc &>::operator new(void)"},
1059 /* 100 */ {"?pSW@@3P6GHKPAX0PAU_tagSTACKFRAME@@0P6GH0K0KPAK@ZP6GPAX0K@ZP6GK0K@ZP6GK00PAU_tagADDRESS@@@Z@ZA", "int (__stdcall* pSW)(unsigned long,void *,void *,struct _tagSTACKFRAME *,void *,int (__stdcall*)(void *,unsigned long,void *,unsigned long,unsigned long *),void * (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,void *,struct _tagADDRESS *))"},
1060 /* 101 */ {"?$_aaa@Vbbb@@", "_aaa<class bbb>"},
1061 /* 102 */ {"?$aaa@Vbbb@ccc@@Vddd@2@", "aaa<class ccc::bbb,class ccc::ddd>"},
1062 /* 103 */ { "??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z", "public: __thiscall Foo<int (__stdcall*)(void *,void *)>::Foo<int (__stdcall*)(void *,void *)>(char *)"},
1063 /* 104 */ { "??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z", "__thiscall Foo<int (__stdcall*)(void *,void *)>::Foo<int (__stdcall*)(void *,void *)>(char *)", NULL
, 0x880},
1064 /* 105 */ { "?Qux@Bar@@0PAP6AHPAV1@AAH1PAH@ZA", "private: static int (__cdecl** Bar::Qux)(class Bar *,int &,int &,int *)" },
1065 /* 106 */ { "?Qux@Bar@@0PAP6AHPAV1@AAH1PAH@ZA", "Bar::Qux", NULL
, 0x1800},
1066 /* 107 */ {"?$AAA@$DBAB@", "AAA<`template-parameter257'>"},
1067 /* 108 */ {"?$AAA@?C@", "AAA<`template-parameter-2'>"},
1068 /* 109 */ {"?$AAA@PAUBBB@@", "AAA<struct BBB *>"},
1069 /* 110 */ {"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z",
1070 "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa * *,class ee *)",
1071 "??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z"},
1072 /* 111 */ {"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"},
1073 /* 112 */ {"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"},
1074 /* 113 */ {"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"},
1075 /* 114 */ {"??0?$Foo@U?$vector_c@H$00$01$0?1$0A@$0A@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@@mpl@boost@@@@QAE@XZ",
1076 "public: __thiscall Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >::Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >(void)"},
1077 /* 115 */ {"?swprintf@@YAHPAGIPBGZZ", "int __cdecl swprintf(unsigned short *,unsigned int,unsigned short const *,...)"},
1078 /* 116 */ {"?vswprintf@@YAHPAGIPBGPAD@Z", "int __cdecl vswprintf(unsigned short *,unsigned int,unsigned short const *,char *)"},
1079 /* 117 */ {"?vswprintf@@YAHPA_WIPB_WPAD@Z", "int __cdecl vswprintf(wchar_t *,unsigned int,wchar_t const *,char *)"},
1080 /* 118 */ {"?swprintf@@YAHPA_WIPB_WZZ", "int __cdecl swprintf(wchar_t *,unsigned int,wchar_t const *,...)"},
1081 /* 119 */ {"??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z", "class std::complex<float> & __ptr64 __cdecl std::operator*=(class std::complex<float> & __ptr64,class std::complex<float> const & __ptr64)"},
1082 /* 120 */ {"?_Doraise@bad_cast@std@@MEBAXXZ", "protected: virtual void __cdecl std::bad_cast::_Doraise(void)const __ptr64"},
1083 /* 121 */ {"??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z",
1084 "class std::complex<float> __cdecl std::operator*<float>(float const &,class std::complex<float> const &)",
1085 "??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z"},
1086 /* 122 */ {"?_R2@?BN@???$_Fabs@N@std@@YANAEBV?$complex@N@1@PEAH@Z@4NB",
1087 "double const `double __cdecl std::_Fabs<double>(class std::complex<double> const & __ptr64,int * __ptr64)'::`29'::_R2",
1088 "?_R2@?BN@???$_Fabs@N@std@@YANAEBV?$complex@N@1@PEAH@Z@4NB"},
1091 int i
, num_test
= (sizeof(test
)/sizeof(test
[0]));
1094 for (i
= 0; i
< num_test
; i
++)
1096 name
= p__unDName(0, test
[i
].in
, 0, pmalloc
, pfree
, test
[i
].flags
);
1097 ok(name
!= NULL
, "%u: unDName failed\n", i
);
1098 if (!name
) continue;
1099 ok( !strcmp_space(test
[i
].out
, name
) ||
1100 broken(test
[i
].broken
&& !strcmp_space(test
[i
].broken
, name
)),
1101 "%u: Got name \"%s\"\n", i
, name
);
1102 ok( !strcmp_space(test
[i
].out
, name
) ||
1103 broken(test
[i
].broken
&& !strcmp_space(test
[i
].broken
, name
)),
1104 "%u: Expected \"%s\"\n", i
, test
[i
].out
);
1111 if (!InitFunctionPtrs())
1117 test___non_rtti_object();
1120 test_demangle_datatype();