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
b61c8f8b
Commit
b61c8f8b
authored
Mar 03, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Mar 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add tests for UuidCreateSequential.
parent
3733789a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
rpc.c
dlls/rpcrt4/tests/rpc.c
+53
-0
No files found.
dlls/rpcrt4/tests/rpc.c
View file @
b61c8f8b
...
...
@@ -804,6 +804,58 @@ static void test_UuidCreate(void)
}
}
static
void
test_UuidCreateSequential
(
void
)
{
UUID
guid1
;
BYTE
version
;
RPC_STATUS
(
WINAPI
*
pUuidCreateSequential
)(
UUID
*
)
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"rpcrt4.dll"
),
"UuidCreateSequential"
);
RPC_STATUS
ret
;
if
(
!
pUuidCreateSequential
)
{
skip
(
"UuidCreateSequential not exported
\n
"
);
return
;
}
ret
=
pUuidCreateSequential
(
&
guid1
);
ok
(
!
ret
||
ret
==
RPC_S_UUID_LOCAL_ONLY
,
"expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x
\n
"
,
ret
);
version
=
(
guid1
.
Data3
&
0xf000
)
>>
12
;
todo_wine
ok
(
version
==
1
,
"unexpected version %d
\n
"
,
version
);
if
(
version
==
1
)
{
UUID
guid2
;
if
(
!
ret
)
{
/* If the call succeeded, there's a valid (non-multicast) MAC
* address in the uuid:
*/
ok
(
!
(
guid1
.
Data4
[
2
]
&
0x01
),
"GUID does not appear to contain a MAC address
\n
"
);
}
else
{
/* Otherwise, there's a randomly generated multicast MAC address
* address in the uuid:
*/
ok
((
guid1
.
Data4
[
2
]
&
0x01
),
"GUID does not appear to contain a multicast MAC address
\n
"
);
}
/* Generate another GUID, and make sure its MAC address matches the
* first.
*/
ret
=
pUuidCreateSequential
(
&
guid2
);
ok
(
!
ret
||
ret
==
RPC_S_UUID_LOCAL_ONLY
,
"expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x
\n
"
,
ret
);
version
=
(
guid2
.
Data3
&
0xf000
)
>>
12
;
todo_wine
ok
(
version
==
1
,
"unexpected version %d
\n
"
,
version
);
ok
(
!
memcmp
(
guid1
.
Data4
,
guid2
.
Data4
,
sizeof
(
guid2
.
Data4
)),
"unexpected value in MAC address
\n
"
);
}
}
static
void
test_RpcBindingFree
(
void
)
{
RPC_BINDING_HANDLE
binding
=
NULL
;
...
...
@@ -826,5 +878,6 @@ START_TEST( rpc )
test_I_RpcExceptionFilter
();
test_RpcStringBindingFromBinding
();
test_UuidCreate
();
test_UuidCreateSequential
();
test_RpcBindingFree
();
}
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