Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
688aa1f5
Commit
688aa1f5
authored
Sep 10, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Skip RTTI signature==1 tests on platforms that doesn't support it.
parent
dd0fe986
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
8 deletions
+34
-8
cpp.c
dlls/msvcrt/tests/cpp.c
+34
-8
No files found.
dlls/msvcrt/tests/cpp.c
View file @
688aa1f5
...
...
@@ -828,6 +828,17 @@ static void test_type_info(void)
ok
(
res
==
1
,
"expected 1, got %d
\n
"
,
res
);
}
static
inline
vtable_ptr
*
get_vtable
(
void
*
obj
)
{
return
*
(
vtable_ptr
**
)
obj
;
}
static
inline
void
/*rtti_object_locator*/
*
get_obj_locator
(
void
*
cppobj
)
{
const
vtable_ptr
*
vtable
=
get_vtable
(
cppobj
);
return
(
void
*
)
vtable
[
-
1
];
}
#ifndef __x86_64__
#define RTTI_SIGNATURE 0
#define DEFINE_RTTI_REF(type, name) type *name
...
...
@@ -840,6 +851,16 @@ static void test_type_info(void)
/* Test RTTI functions */
static
void
test_rtti
(
void
)
{
struct
_object_locator
{
unsigned
int
signature
;
int
base_class_offset
;
unsigned
int
flags
;
DEFINE_RTTI_REF
(
type_info
,
type_descriptor
);
DEFINE_RTTI_REF
(
struct
_rtti_object_hierarchy
,
type_hierarchy
);
DEFINE_RTTI_REF
(
void
,
object_locator
);
}
*
obj_locator
;
struct
rtti_data
{
type_info
type_info
[
4
];
...
...
@@ -867,14 +888,7 @@ static void test_rtti(void)
DEFINE_RTTI_REF
(
struct
_rtti_base_array
,
base_classes
);
}
object_hierarchy
;
struct
{
unsigned
int
signature
;
int
base_class_offset
;
unsigned
int
flags
;
DEFINE_RTTI_REF
(
type_info
,
type_descriptor
);
DEFINE_RTTI_REF
(
struct
_rtti_object_hierarchy
,
type_hierarchy
);
DEFINE_RTTI_REF
(
void
,
object_locator
);
}
object_locator
;
struct
_object_locator
object_locator
;
}
simple_class_rtti
=
{
{
{
NULL
,
NULL
,
"simple_class"
}
},
{
{
RTTI_REF
(
simple_class_rtti
,
type_info
[
0
]),
0
,
{
0
,
0
,
0
},
0
}
},
...
...
@@ -897,6 +911,7 @@ static void test_rtti(void)
type_info
*
ti
,
*
bti
;
exception
e
,
b
;
void
*
casted
;
BOOL
old_signature
;
if
(
bAncientVersion
||
!
p__RTCastToVoid
||
!
p__RTtypeid
||
!
pexception_ctor
||
!
pbad_typeid_ctor
...
...
@@ -906,6 +921,12 @@ static void test_rtti(void)
call_func2
(
pexception_ctor
,
&
e
,
&
e_name
);
call_func2
(
pbad_typeid_ctor
,
&
b
,
e_name
);
obj_locator
=
get_obj_locator
(
&
e
);
if
(
obj_locator
->
signature
!=
RTTI_SIGNATURE
&&
sizeof
(
void
*
)
>
sizeof
(
int
))
old_signature
=
TRUE
;
else
old_signature
=
FALSE
;
/* dynamic_cast to void* */
casted
=
p__RTCastToVoid
(
&
e
);
ok
(
casted
==
(
void
*
)
&
e
,
"failed cast to void
\n
"
);
...
...
@@ -928,6 +949,11 @@ static void test_rtti(void)
call_func1
(
pexception_dtor
,
&
e
);
call_func1
(
pbad_typeid_dtor
,
&
b
);
if
(
old_signature
)
{
skip
(
"signature==1 is not supported
\n
"
);
return
;
}
ti
=
p__RTtypeid
(
&
simple_class
);
ok
(
ti
&&
ti
->
mangled
&&
!
strcmp
(
ti
->
mangled
,
"simple_class"
),
"incorrect rtti data
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment