Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
613a6598
Commit
613a6598
authored
Mar 08, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Some tests for IsMatchingType().
parent
8c826a3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
14 deletions
+73
-14
recinfo.c
dlls/oleaut32/recinfo.c
+1
-6
test_reg.idl
dlls/oleaut32/tests/test_reg.idl
+8
-0
test_tlb.idl
dlls/oleaut32/tests/test_tlb.idl
+10
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+9
-3
vartype.c
dlls/oleaut32/tests/vartype.c
+45
-5
No files found.
dlls/oleaut32/recinfo.c
View file @
613a6598
...
...
@@ -517,12 +517,7 @@ static BOOL WINAPI IRecordInfoImpl_IsMatchingType(IRecordInfo *iface, IRecordInf
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
info2
);
IRecordInfo_GetGuid
(
info2
,
&
guid2
);
if
(
IsEqualGUID
(
&
This
->
guid
,
&
guid2
))
return
TRUE
;
FIXME
(
"records have different guids (%s %s) but could still match
\n
"
,
debugstr_guid
(
&
This
->
guid
),
debugstr_guid
(
&
guid2
)
);
return
FALSE
;
return
IsEqualGUID
(
&
This
->
guid
,
&
guid2
);
}
static
PVOID
WINAPI
IRecordInfoImpl_RecordCreate
(
IRecordInfo
*
iface
)
...
...
dlls/oleaut32/tests/test_reg.idl
View file @
613a6598
...
...
@@ -142,4 +142,12 @@ library register_test
[
propputref
,
id
(
2
)
]
LONG
testprop2
(
[
in
]
IUnknown
*
i
)
;
}
/*
uuid
is
same
as
for
test_struct2
in
test_tlb
.
idl
,
fields
are
different
*/
[
uuid
(
4029
f190
-
ca4a
-
4611
-
aeb9
-
673983
cb96de
)
]
struct
test_struct3
{
UINT32
field
;
HRESULT
hr
;
}
;
}
dlls/oleaut32/tests/test_tlb.idl
View file @
613a6598
...
...
@@ -48,4 +48,14 @@ library Test
IDispatch
*
disp
;
BSTR
bstr
;
}
;
/*
identical
to
'test_struct'
,
only
guid
is
different
*/
[
uuid
(
4029
f190
-
ca4a
-
4611
-
aeb9
-
673983
cb96de
)
]
struct
test_struct2
{
HRESULT
hr
;
VARIANT_BOOL
b
;
IDispatch
*
disp
;
BSTR
bstr
;
}
;
}
dlls/oleaut32/tests/typelib.c
View file @
613a6598
...
...
@@ -4002,6 +4002,11 @@ static const type_info info[] = {
"test_struct"
,
"{4029f190-ca4a-4611-aeb9-673983cb96dd}"
,
/* kind */
TKIND_RECORD
,
/*flags*/
0
,
/*align*/
4
,
/*size*/
sizeof
(
struct
test_struct
)
},
{
"test_struct2"
,
"{4029f190-ca4a-4611-aeb9-673983cb96de}"
,
/* kind */
TKIND_RECORD
,
/*flags*/
0
,
/*align*/
4
,
/*size*/
sizeof
(
struct
test_struct
)
}
};
...
...
@@ -4210,7 +4215,7 @@ static void test_register_typelib(BOOL system_registration)
{
TYPEKIND
kind
;
WORD
flags
;
}
attrs
[
1
2
]
=
}
attrs
[
1
3
]
=
{
{
TKIND_INTERFACE
,
0
},
{
TKIND_INTERFACE
,
TYPEFLAG_FDISPATCHABLE
},
...
...
@@ -4223,7 +4228,8 @@ static void test_register_typelib(BOOL system_registration)
{
TKIND_DISPATCH
,
TYPEFLAG_FDISPATCHABLE
},
{
TKIND_DISPATCH
,
TYPEFLAG_FDISPATCHABLE
},
{
TKIND_DISPATCH
,
TYPEFLAG_FDISPATCHABLE
},
{
TKIND_INTERFACE
,
TYPEFLAG_FDISPATCHABLE
}
{
TKIND_INTERFACE
,
TYPEFLAG_FDISPATCHABLE
},
{
TKIND_RECORD
,
0
}
};
trace
(
"Starting %s typelib registration tests
\n
"
,
...
...
@@ -4258,7 +4264,7 @@ static void test_register_typelib(BOOL system_registration)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
count
=
ITypeLib_GetTypeInfoCount
(
typelib
);
ok
(
count
==
1
2
,
"got %d
\n
"
,
count
);
ok
(
count
==
1
3
,
"got %d
\n
"
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
...
...
dlls/oleaut32/tests/vartype.c
View file @
613a6598
...
...
@@ -6382,24 +6382,32 @@ static void test_recinfo(void)
{
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
WCHAR
teststructW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'_'
,
's'
,
't'
,
'r'
,
'u'
,
'c'
,
't'
,
0
};
static
WCHAR
teststruct2W
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'_'
,
's'
,
't'
,
'r'
,
'u'
,
'c'
,
't'
,
'2'
,
0
};
static
WCHAR
teststruct3W
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'_'
,
's'
,
't'
,
'r'
,
'u'
,
'c'
,
't'
,
'3'
,
0
};
WCHAR
filenameW
[
MAX_PATH
],
filename2W
[
MAX_PATH
];
ITypeInfo
*
typeinfo
,
*
typeinfo2
,
*
typeinfo3
;
IRecordInfo
*
recinfo
,
*
recinfo2
,
*
recinfo3
;
struct
test_struct
teststruct
,
testcopy
;
WCHAR
filenameW
[
MAX_PATH
]
;
ITypeLib
*
typelib
,
*
typelib2
;
const
char
*
filename
;
IRecordInfo
*
recinfo
;
ITypeInfo
*
typeinfo
;
DummyDispatch
dispatch
;
ITypeLib
*
typelib
;
TYPEATTR
*
attr
;
MEMBERID
memid
;
UINT16
found
;
HRESULT
hr
;
ULONG
size
;
BOOL
ret
;
filename
=
create_test_typelib
(
2
);
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
filenameW
,
MAX_PATH
);
hr
=
LoadTypeLibEx
(
filenameW
,
REGKIND_NONE
,
&
typelib
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
filename
=
create_test_typelib
(
3
);
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
filename2W
,
MAX_PATH
);
hr
=
LoadTypeLibEx
(
filename2W
,
REGKIND_NONE
,
&
typelib2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
typeinfo
=
NULL
;
found
=
1
;
hr
=
ITypeLib_FindName
(
typelib
,
teststructW
,
0
,
&
typeinfo
,
&
memid
,
&
found
);
...
...
@@ -6410,9 +6418,40 @@ static void test_recinfo(void)
ok
(
IsEqualGUID
(
&
attr
->
guid
,
&
UUID_test_struct
),
"got %s
\n
"
,
wine_dbgstr_guid
(
&
attr
->
guid
));
ok
(
attr
->
typekind
==
TKIND_RECORD
,
"got %d
\n
"
,
attr
->
typekind
);
typeinfo2
=
NULL
;
found
=
1
;
hr
=
ITypeLib_FindName
(
typelib
,
teststruct2W
,
0
,
&
typeinfo2
,
&
memid
,
&
found
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
typeinfo2
!=
NULL
,
"got %p
\n
"
,
typeinfo2
);
typeinfo3
=
NULL
;
found
=
1
;
hr
=
ITypeLib_FindName
(
typelib2
,
teststruct3W
,
0
,
&
typeinfo3
,
&
memid
,
&
found
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
typeinfo3
!=
NULL
,
"got %p
\n
"
,
typeinfo3
);
hr
=
GetRecordInfoFromTypeInfo
(
typeinfo
,
&
recinfo
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
GetRecordInfoFromTypeInfo
(
typeinfo2
,
&
recinfo2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
GetRecordInfoFromTypeInfo
(
typeinfo3
,
&
recinfo3
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* IsMatchingType, these two records only differ in GUIDs */
ret
=
IRecordInfo_IsMatchingType
(
recinfo
,
recinfo2
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
/* these two have same GUIDs, but different set of fields */
ret
=
IRecordInfo_IsMatchingType
(
recinfo2
,
recinfo3
);
ok
(
ret
,
"got %d
\n
"
,
ret
);
IRecordInfo_Release
(
recinfo3
);
ITypeInfo_Release
(
typeinfo3
);
IRecordInfo_Release
(
recinfo2
);
ITypeInfo_Release
(
typeinfo2
);
size
=
0
;
hr
=
IRecordInfo_GetSize
(
recinfo
,
&
size
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -6471,7 +6510,8 @@ static void test_recinfo(void)
ITypeInfo_Release
(
typeinfo
);
ITypeLib_Release
(
typelib
);
DeleteFileA
(
filename
);
DeleteFileW
(
filenameW
);
DeleteFileW
(
filename2W
);
}
START_TEST
(
vartype
)
...
...
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