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
0cf08782
Commit
0cf08782
authored
Jul 06, 2008
by
Jon Griffiths
Committed by
Alexandre Julliard
Jul 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/test: Fix valgrind leaks.
parent
4f51b6c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
varformat.c
dlls/oleaut32/tests/varformat.c
+6
-3
No files found.
dlls/oleaut32/tests/varformat.c
View file @
0cf08782
...
...
@@ -64,9 +64,11 @@ static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 )
VariantInit(&v); V_VT(&v) = vt; val(&v) = 1; \
hres = pVarFormatNumber(&v,2,0,0,0,0,&str); \
ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8x\n", vt, hres); \
if (hres == S_OK) \
if (hres == S_OK)
{
\
ok(str && strcmpW(str,szResult1) == 0, \
"VarFormatNumber (vt %d): string different\n", vt)
"VarFormatNumber (vt %d): string different\n", vt); \
if (str) SysFreeString(str); \
}
static
void
test_VarFormatNumber
(
void
)
{
...
...
@@ -126,7 +128,7 @@ static void test_VarFormatNumber(void)
static
const
char
*
szVarFmtFail
=
"VT %d|0x%04x Format %s: expected 0x%08x, '%s', got 0x%08x, '%s'
\n
"
;
#define VARFMT(vt,v,val,fmt,ret,str) do { \
if (out) SysFreeString(out);
out = NULL; \
out = NULL; \
V_VT(&in) = (vt); v(&in) = val; \
if (fmt) MultiByteToWideChar(CP_ACP, 0, fmt, -1, buffW, sizeof(buffW)/sizeof(WCHAR)); \
hres = pVarFormat(&in,fmt ? buffW : NULL,fd,fw,flags,&out); \
...
...
@@ -135,6 +137,7 @@ static const char *szVarFmtFail = "VT %d|0x%04x Format %s: expected 0x%08x, '%s'
ok(hres == ret && (FAILED(ret) || !strcmp(buff, str)), \
szVarFmtFail, \
(vt)&VT_TYPEMASK,(vt)&~VT_TYPEMASK,fmt?fmt:"<null>",ret,str,hres,buff); \
if (out) SysFreeString(out); \
} while(0)
typedef
struct
tagFMTRES
...
...
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