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
45399c9c
Commit
45399c9c
authored
Feb 23, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activeds/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb3b8493
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
32 deletions
+31
-32
Makefile.in
dlls/activeds/tests/Makefile.in
+0
-1
activeds.c
dlls/activeds/tests/activeds.c
+31
-31
No files found.
dlls/activeds/tests/Makefile.in
View file @
45399c9c
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
activeds.dll
IMPORTS
=
ole32 oleaut32 activeds
...
...
dlls/activeds/tests/activeds.c
View file @
45399c9c
...
...
@@ -41,46 +41,46 @@ static void test_ADsBuildVarArrayStr(void)
LONG
start
,
end
,
idx
;
hr
=
ADsBuildVarArrayStr
(
NULL
,
0
,
NULL
);
ok
(
hr
==
E_ADS_BAD_PARAMETER
||
hr
==
E_FAIL
/* XP */
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
E_ADS_BAD_PARAMETER
||
hr
==
E_FAIL
/* XP */
,
"got %#
l
x
\n
"
,
hr
);
hr
=
ADsBuildVarArrayStr
(
NULL
,
0
,
&
var
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
V_VT
(
&
var
)
==
(
VT_ARRAY
|
VT_VARIANT
),
"got %d
\n
"
,
V_VT
(
&
var
));
start
=
0xdeadbeef
;
hr
=
SafeArrayGetLBound
(
V_ARRAY
(
&
var
),
1
,
&
start
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
start
==
0
,
"got %d
\n
"
,
start
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
start
==
0
,
"got %
l
d
\n
"
,
start
);
end
=
0xdeadbeef
;
hr
=
SafeArrayGetUBound
(
V_ARRAY
(
&
var
),
1
,
&
end
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
end
==
-
1
,
"got %d
\n
"
,
end
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
end
==
-
1
,
"got %
l
d
\n
"
,
end
);
VariantClear
(
&
var
);
hr
=
ADsBuildVarArrayStr
((
LPWSTR
*
)
props
,
ARRAY_SIZE
(
props
),
&
var
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
V_VT
(
&
var
)
==
(
VT_ARRAY
|
VT_VARIANT
),
"got %d
\n
"
,
V_VT
(
&
var
));
start
=
0xdeadbeef
;
hr
=
SafeArrayGetLBound
(
V_ARRAY
(
&
var
),
1
,
&
start
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
start
==
0
,
"got %d
\n
"
,
start
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
start
==
0
,
"got %
l
d
\n
"
,
start
);
end
=
0xdeadbeef
;
hr
=
SafeArrayGetUBound
(
V_ARRAY
(
&
var
),
1
,
&
end
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
end
==
1
,
"got %d
\n
"
,
end
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
end
==
1
,
"got %
l
d
\n
"
,
end
);
idx
=
0
;
hr
=
SafeArrayGetElement
(
V_ARRAY
(
&
var
),
&
idx
,
&
item
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
V_VT
(
&
item
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
item
));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
item
),
L"prop1"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
item
)));
VariantClear
(
&
item
);
hr
=
SafeArrayAccessData
(
V_ARRAY
(
&
var
),
(
void
*
)
&
data
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
V_VT
(
&
data
[
0
])
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
data
[
0
]));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
data
[
0
]),
L"prop1"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
data
[
0
])));
ok
(
V_VT
(
&
data
[
0
])
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
data
[
0
]));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
data
[
1
]),
L"prop2"
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
data
[
1
])));
hr
=
SafeArrayUnaccessData
(
V_ARRAY
(
&
var
));
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
VariantClear
(
&
var
);
}
...
...
@@ -93,68 +93,68 @@ static void test_Pathname(void)
LONG
count
,
i
;
hr
=
CoCreateInstance
(
&
CLSID_Pathname
,
0
,
CLSCTX_INPROC_SERVER
,
&
IID_IADsPathname
,
(
void
**
)
&
path
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
count
=
0xdeadbeef
;
hr
=
IADsPathname_GetNumElements
(
path
,
&
count
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %d
\n
"
,
count
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %
l
d
\n
"
,
count
);
bstr
=
NULL
;
hr
=
IADsPathname_Retrieve
(
path
,
ADS_FORMAT_X500
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
bstr
&&
!
wcscmp
(
bstr
,
L"LDAP://"
),
"got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
bstr
=
SysAllocString
(
L"LDAP://sample"
);
hr
=
IADsPathname_Set
(
path
,
bstr
,
ADS_SETTYPE_FULL
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
SysFreeString
(
bstr
);
count
=
0xdeadbeef
;
hr
=
IADsPathname_GetNumElements
(
path
,
&
count
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %d
\n
"
,
count
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
count
==
0
,
"got %
l
d
\n
"
,
count
);
hr
=
IADsPathname_GetElement
(
path
,
0
,
&
bstr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_INDEX
),
"got %#x
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_INDEX
),
"got %#
l
x
\n
"
,
hr
);
SysFreeString
(
bstr
);
bstr
=
SysAllocString
(
L"LDAP://sample:123/a=b,c=d,e=f"
);
hr
=
IADsPathname_Set
(
path
,
bstr
,
ADS_SETTYPE_FULL
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
SysFreeString
(
bstr
);
count
=
0xdeadbeef
;
hr
=
IADsPathname_GetNumElements
(
path
,
&
count
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
count
==
3
,
"got %d
\n
"
,
count
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
count
==
3
,
"got %
l
d
\n
"
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
hr
=
IADsPathname_GetElement
(
path
,
i
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
!
wcscmp
(
bstr
,
elem
[
i
]),
"%u: %s
\n
"
,
i
,
wine_dbgstr_w
(
bstr
));
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
!
wcscmp
(
bstr
,
elem
[
i
]),
"%
l
u: %s
\n
"
,
i
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
}
hr
=
IADsPathname_Retrieve
(
path
,
ADS_FORMAT_X500
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
!
wcscmp
(
bstr
,
L"LDAP://sample:123/a=b,c=d,e=f"
),
"got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
IADsPathname_Retrieve
(
path
,
ADS_FORMAT_PROVIDER
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
!
wcscmp
(
bstr
,
L"LDAP"
),
"got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
IADsPathname_Retrieve
(
path
,
ADS_FORMAT_SERVER
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
!
wcscmp
(
bstr
,
L"sample:123"
),
"got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
IADsPathname_Retrieve
(
path
,
ADS_FORMAT_LEAF
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#
l
x
\n
"
,
hr
);
ok
(
!
wcscmp
(
bstr
,
L"a=b"
),
"got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
...
...
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