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
cb5beede
Commit
cb5beede
authored
Sep 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Add more tests for integer ranges to show that ranges are independent.
Reported by Jérôme Gardou.
parent
977e15b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
server.c
dlls/rpcrt4/tests/server.c
+11
-4
server.idl
dlls/rpcrt4/tests/server.idl
+2
-1
No files found.
dlls/rpcrt4/tests/server.c
View file @
cb5beede
...
...
@@ -599,9 +599,14 @@ str_t __cdecl s_get_filename(void)
return
(
char
*
)
__FILE__
;
}
int
__cdecl
s_echo_ranged_int
(
int
n
)
int
__cdecl
s_echo_ranged_int
(
int
i
,
int
j
,
int
k
)
{
return
n
;
return
min
(
100
,
i
+
j
+
k
);
}
int
__cdecl
s_echo_ranged_int2
(
int
i
)
{
return
i
;
}
void
__cdecl
s_get_ranged_enum
(
renum_t
*
re
)
...
...
@@ -934,10 +939,12 @@ basic_tests(void)
ok
(
!
strcmp
(
str
,
__FILE__
),
"get_filename() returned %s instead of %s
\n
"
,
str
,
__FILE__
);
midl_user_free
(
str
);
x
=
echo_ranged_int
(
0
);
x
=
echo_ranged_int
(
0
,
0
,
0
);
ok
(
x
==
0
,
"echo_ranged_int() returned %d instead of 0
\n
"
,
x
);
x
=
echo_ranged_int
(
100
);
x
=
echo_ranged_int
(
10
,
20
,
10
0
);
ok
(
x
==
100
,
"echo_ranged_int() returned %d instead of 100
\n
"
,
x
);
x
=
echo_ranged_int2
(
40
);
ok
(
x
==
40
,
"echo_ranged_int() returned %d instead of 40
\n
"
,
x
);
if
(
!
old_windows_version
)
{
...
...
dlls/rpcrt4/tests/server.idl
View file @
cb5beede
...
...
@@ -363,7 +363,8 @@ cpp_quote("#endif")
const
int
RE_MAX
=
RE3
;
typedef
[
range
(
RE_MIN
,
RE_MAX
)
]
enum
renum
renum_t
;
typedef
[
range
(
0
,
100
)
]
int
rint_t
;
rint_t
echo_ranged_int
(
[
range
(
0
,
100
)
]
int
n
)
;
rint_t
echo_ranged_int
(
[
range
(
0
,
10
)
]
int
i
,
[
range
(
0
,
20
)
]
int
j
,
[
range
(
0
,
100
)
]
int
k
)
;
rint_t
echo_ranged_int2
(
[
range
(
0
,
40
)
]
int
i
)
;
void
get_ranged_enum
(
[
out
]
renum_t
*
re
)
;
void
context_handle_test
(
void
)
;
...
...
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