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
e86828a0
Commit
e86828a0
authored
Aug 15, 2006
by
Robert Reif
Committed by
Alexandre Julliard
Aug 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Add GetComputerObjectName tests.
parent
1771a550
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
1 deletion
+70
-1
Makefile.in
dlls/secur32/tests/Makefile.in
+2
-1
secur32.c
dlls/secur32/tests/secur32.c
+68
-0
No files found.
dlls/secur32/tests/Makefile.in
View file @
e86828a0
...
...
@@ -8,7 +8,8 @@ IMPORTS = crypt32 secur32 advapi32 kernel32
CTESTS
=
\
main.c
\
ntlm.c
\
schannel.c
schannel.c
\
secur32.c
@MAKE_TEST_RULES@
...
...
dlls/secur32/tests/secur32.c
0 → 100644
View file @
e86828a0
/*
* tests
*
* Copyright 2006 Robert Reif
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#define SECURITY_WIN32
#include <security.h>
#include <schannel.h>
#include "wine/test.h"
static
void
testGetComputerObjectName
()
{
char
name
[
256
];
WCHAR
nameW
[
256
];
ULONG
size
;
BOOLEAN
rc
;
int
i
;
EXTENDED_NAME_FORMAT
formats
[]
=
{
NameUnknown
,
NameFullyQualifiedDN
,
NameSamCompatible
,
NameDisplay
,
NameUniqueId
,
NameCanonical
,
NameUserPrincipal
,
NameCanonicalEx
,
NameServicePrincipal
,
NameDnsDomain
};
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]));
i
++
)
{
size
=
sizeof
(
name
);
ZeroMemory
(
name
,
sizeof
(
name
));
rc
=
GetComputerObjectNameA
(
formats
[
i
],
name
,
&
size
);
ok
(
rc
||
((
formats
[
i
]
==
NameUnknown
)
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
))
||
(
GetLastError
()
==
ERROR_CANT_ACCESS_DOMAIN_INFO
),
"GetComputerObjectNameA(%d) failed: %ld
\n
"
,
formats
[
i
],
GetLastError
());
if
(
rc
)
trace
(
"GetComputerObjectNameA() returned %s
\n
"
,
name
);
size
=
sizeof
(
nameW
)
/
sizeof
(
nameW
[
0
]);
ZeroMemory
(
nameW
,
sizeof
(
nameW
));
rc
=
GetComputerObjectNameW
(
formats
[
i
],
nameW
,
&
size
);
ok
(
rc
||
((
formats
[
i
]
==
NameUnknown
)
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
))
||
(
GetLastError
()
==
ERROR_CANT_ACCESS_DOMAIN_INFO
),
"GetComputerObjectNameW(%d) failed: %ld
\n
"
,
formats
[
i
],
GetLastError
());
}
}
START_TEST
(
secur32
)
{
testGetComputerObjectName
();
}
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