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
e767a2c0
Commit
e767a2c0
authored
Jun 10, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
Jun 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Add a win_skip() function to allow for missing Windows functionality that…
tests: Add a win_skip() function to allow for missing Windows functionality that must be present in Wine.
parent
ad2c9211
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
18 deletions
+46
-18
test.h
include/wine/test.h
+46
-18
No files found.
include/wine/test.h
View file @
e767a2c0
...
...
@@ -69,28 +69,34 @@ extern void winetest_wait_child_process( HANDLE process );
#endif
extern
int
broken
(
int
condition
);
extern
int
winetest_vok
(
int
condition
,
const
char
*
msg
,
va_list
ap
);
extern
void
winetest_vskip
(
const
char
*
msg
,
va_list
ap
);
#ifdef __GNUC__
extern
int
winetest_ok
(
int
condition
,
const
char
*
msg
,
...
)
__attribute__
((
format
(
printf
,
2
,
3
)
));
extern
void
winetest_skip
(
const
char
*
msg
,
...
)
__attribute__
((
format
(
printf
,
1
,
2
)));
extern
void
winetest_win_skip
(
const
char
*
msg
,
...
)
__attribute__
((
format
(
printf
,
1
,
2
)));
extern
void
winetest_trace
(
const
char
*
msg
,
...
)
__attribute__
((
format
(
printf
,
1
,
2
)));
#else
/* __GNUC__ */
extern
int
winetest_ok
(
int
condition
,
const
char
*
msg
,
...
);
extern
void
winetest_skip
(
const
char
*
msg
,
...
);
extern
void
winetest_win_skip
(
const
char
*
msg
,
...
);
extern
void
winetest_trace
(
const
char
*
msg
,
...
);
#endif
/* __GNUC__ */
#define ok_(file, line) (winetest_set_location(file, line), 0) ? 0 : winetest_ok
#define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip
#define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
#define ok_(file, line) (winetest_set_location(file, line), 0) ? 0 : winetest_ok
#define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip
#define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip
#define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
#define ok ok_(__FILE__, __LINE__)
#define skip skip_(__FILE__, __LINE__)
#define trace trace_(__FILE__, __LINE__)
#define ok ok_(__FILE__, __LINE__)
#define skip skip_(__FILE__, __LINE__)
#define win_skip win_skip_(__FILE__, __LINE__)
#define trace trace_(__FILE__, __LINE__)
#define todo(platform) for (winetest_start_todo(platform); \
winetest_loop_todo(); \
...
...
@@ -241,9 +247,8 @@ int broken( int condition )
* Return:
* 0 if condition does not have the expected value, 1 otherwise
*/
int
winetest_
ok
(
int
condition
,
const
char
*
msg
,
...
)
int
winetest_
vok
(
int
condition
,
const
char
*
msg
,
va_list
args
)
{
va_list
valist
;
tls_data
*
data
=
get_tls_data
();
if
(
data
->
todo_level
)
...
...
@@ -254,10 +259,8 @@ int winetest_ok( int condition, const char *msg, ... )
data
->
current_file
,
data
->
current_line
);
if
(
msg
[
0
])
{
va_start
(
valist
,
msg
);
fprintf
(
stdout
,
": "
);
vfprintf
(
stdout
,
msg
,
valist
);
va_end
(
valist
);
vfprintf
(
stdout
,
msg
,
args
);
}
InterlockedIncrement
(
&
todo_failures
);
return
0
;
...
...
@@ -272,10 +275,8 @@ int winetest_ok( int condition, const char *msg, ... )
data
->
current_file
,
data
->
current_line
);
if
(
msg
[
0
])
{
va_start
(
valist
,
msg
);
fprintf
(
stdout
,
": "
);
vfprintf
(
stdout
,
msg
,
valist
);
va_end
(
valist
);
vfprintf
(
stdout
,
msg
,
args
);
}
InterlockedIncrement
(
&
failures
);
return
0
;
...
...
@@ -291,6 +292,17 @@ int winetest_ok( int condition, const char *msg, ... )
return
1
;
}
int
winetest_ok
(
int
condition
,
const
char
*
msg
,
...
)
{
va_list
valist
;
int
rc
;
va_start
(
valist
,
msg
);
rc
=
winetest_vok
(
condition
,
msg
,
valist
);
va_end
(
valist
);
return
rc
;
}
void
winetest_trace
(
const
char
*
msg
,
...
)
{
va_list
valist
;
...
...
@@ -305,16 +317,32 @@ void winetest_trace( const char *msg, ... )
}
}
void
winetest_
skip
(
const
char
*
msg
,
...
)
void
winetest_
vskip
(
const
char
*
msg
,
va_list
args
)
{
va_list
valist
;
tls_data
*
data
=
get_tls_data
();
fprintf
(
stdout
,
"%s:%d: Tests skipped: "
,
data
->
current_file
,
data
->
current_line
);
vfprintf
(
stdout
,
msg
,
args
);
skipped
++
;
}
void
winetest_skip
(
const
char
*
msg
,
...
)
{
va_list
valist
;
va_start
(
valist
,
msg
);
vfprintf
(
stdout
,
msg
,
valist
);
winetest_vskip
(
msg
,
valist
);
va_end
(
valist
);
}
void
winetest_win_skip
(
const
char
*
msg
,
...
)
{
va_list
valist
;
va_start
(
valist
,
msg
);
if
(
strcmp
(
winetest_platform
,
"windows"
)
==
0
)
winetest_vskip
(
msg
,
valist
);
else
winetest_vok
(
0
,
msg
,
valist
);
va_end
(
valist
);
skipped
++
;
}
void
winetest_start_todo
(
const
char
*
platform
)
...
...
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