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
50c0cdef
Commit
50c0cdef
authored
Dec 18, 2002
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 18, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsprintfW is not supported on Win9x platforms.
wsprintf{A,W}Test should be void. Improve error reporting. Remove unnecessary #includes.
parent
23aa0f64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
22 deletions
+19
-22
wsprintf.c
dlls/user/tests/wsprintf.c
+19
-22
No files found.
dlls/user/tests/wsprintf.c
View file @
50c0cdef
...
...
@@ -17,41 +17,38 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "wine/test.h"
#include "winbase.h"
#include "winuser.h"
static
BOOL
wsprintfATest
(
void
)
static
void
wsprintfATest
(
void
)
{
char
buf
[
25
];
int
rc
;
ok
((
wsprintfA
(
buf
,
"%010ld"
,
-
1
)
==
10
),
"wsPrintfA length failure"
);
ok
((
strcmp
(
buf
,
"-000000001"
)
==
0
),
"wsprintfA zero padded negative value failure
\n
"
);
return
TRUE
;
rc
=
wsprintfA
(
buf
,
"%010ld"
,
-
1
);
ok
(
rc
==
10
,
"wsPrintfA length failure: rc=%d error=%ld"
,
rc
,
GetLastError
());
ok
((
lstrcmpA
(
buf
,
"-000000001"
)
==
0
),
"wsprintfA zero padded negative value failure: buf=[%s]"
,
buf
);
}
static
BOOL
wsprintfWTest
(
void
)
static
void
wsprintfWTest
(
void
)
{
static
const
WCHAR
fmt
[]
=
{
'%'
,
'0'
,
'1'
,
'0'
,
'l'
,
'd'
,
'\0'
};
static
const
WCHAR
target
[]
=
{
'-'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'1'
,
'\0'
};
WCHAR
buf
[
25
];
static
const
WCHAR
fmt
[]
=
{
'%'
,
'0'
,
'1'
,
'0'
,
'l'
,
'd'
,
'\0'
}
;
static
const
WCHAR
target
[]
=
{
'-'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'1'
,
'\0'
};
ok
((
wsprintfW
(
buf
,
fmt
,
-
1
)
==
10
),
"wsPrintfW length failure"
);
ok
((
lstrcmpW
(
buf
,
target
)
==
0
),
"wsprintfW zero padded negative value failure
\n
"
);
return
TRUE
;
int
rc
;
rc
=
wsprintfW
(
buf
,
fmt
,
-
1
);
if
(
rc
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
return
;
ok
(
rc
==
10
,
"wsPrintfW length failure: rc=%d error=%ld"
,
rc
,
GetLastError
()
);
ok
((
lstrcmpW
(
buf
,
target
)
==
0
),
"wsprintfW zero padded negative value failure"
)
;
}
START_TEST
(
wsprintf
)
{
wsprintfATest
();
wsprintfWTest
();
wsprintfATest
();
wsprintfWTest
();
}
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