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
08c846a9
Commit
08c846a9
authored
Jun 18, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Jun 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add encapsulated union tests.
parent
72ab72c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
server.c
dlls/rpcrt4/tests/server.c
+23
-0
server.idl
dlls/rpcrt4/tests/server.idl
+8
-0
server_defines.h
dlls/rpcrt4/tests/server_defines.h
+4
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
08c846a9
...
...
@@ -245,6 +245,18 @@ s_square_test_us(test_us_t *tus)
return
n
*
n
;
}
double
s_square_encu
(
encu_t
*
eu
)
{
switch
(
eu
->
t
)
{
case
ENCU_I
:
return
eu
->
tagged_union
.
i
*
eu
->
tagged_union
.
i
;
case
ENCU_F
:
return
eu
->
tagged_union
.
f
*
eu
->
tagged_union
.
f
;
default:
return
0
.
0
;
}
}
void
s_stop
(
void
)
{
...
...
@@ -363,6 +375,7 @@ basic_tests(void)
static
void
union_tests
(
void
)
{
encu_t
eu
;
sun_t
su
;
int
i
;
...
...
@@ -382,6 +395,16 @@ union_tests(void)
su
.
u
.
pi
=
&
i
;
i
=
11
;
ok
(
square_sun
(
&
su
)
==
121
.
0
,
"RPC square_sun
\n
"
);
todo_wine
{
eu
.
t
=
ENCU_I
;
eu
.
tagged_union
.
i
=
7
;
ok
(
square_encu
(
&
eu
)
==
49
.
0
,
"RPC square_encu
\n
"
);
eu
.
t
=
ENCU_F
;
eu
.
tagged_union
.
f
=
3
.
0
;
ok
(
square_encu
(
&
eu
)
==
9
.
0
,
"RPC square_encu
\n
"
);
}
}
static
test_list_t
*
...
...
dlls/rpcrt4/tests/server.idl
View file @
08c846a9
...
...
@@ -150,5 +150,13 @@ interface IServer
} test_us_t;
int square_test_us(test_us_t *tus);
typedef union encu switch (int t)
{
case ENCU_I: int i;
case ENCU_F: float f;
} encu_t;
double square_encu(encu_t *eu);
void stop(void);
}
dlls/rpcrt4/tests/server_defines.h
View file @
08c846a9
...
...
@@ -27,3 +27,7 @@
/* test_list_t case values */
#define TL_NULL 0
#define TL_LIST 1
/* encu_t case values */
#define ENCU_I 27
#define ENCU_F 0
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