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
b45d4aa1
Commit
b45d4aa1
authored
Jan 10, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Jan 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Simplify string generation.
parent
8037de9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
atom.c
dlls/kernel32/tests/atom.c
+3
-17
No files found.
dlls/kernel32/tests/atom.c
View file @
b45d4aa1
...
...
@@ -32,6 +32,7 @@
static
const
WCHAR
foobarW
[]
=
{
'f'
,
'o'
,
'o'
,
'b'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
FOOBARW
[]
=
{
'F'
,
'O'
,
'O'
,
'B'
,
'A'
,
'R'
,
0
};
static
const
WCHAR
_foobarW
[]
=
{
'_'
,
'f'
,
'o'
,
'o'
,
'b'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
integfmt
[]
=
{
'#'
,
'%'
,
'd'
,
0
};
static
void
do_initA
(
char
*
tmp
,
const
char
*
pattern
,
int
len
)
{
...
...
@@ -57,21 +58,6 @@ static void do_initW(WCHAR* tmp, const char* pattern, int len)
*
tmp
=
'\0'
;
}
static
void
print_integral
(
WCHAR
*
buffer
,
int
atom
)
{
BOOL
first
=
TRUE
;
#define X(v) { if (atom >= v) {*buffer++ = '0' + atom / v; first = FALSE; } else if (!first || v == 1) *buffer++ = '0'; atom %= v; }
*
buffer
++
=
'#'
;
X
(
10000
);
X
(
1000
);
X
(
100
);
X
(
10
);
X
(
1
);
*
buffer
=
'\0'
;
#undef X
}
static
BOOL
unicode_OS
;
static
void
test_add_atom
(
void
)
...
...
@@ -281,7 +267,7 @@ static void test_get_atom_name(void)
WCHAR
res
[
20
];
ok
(
(
len
>
1
)
&&
(
len
<
7
),
"bad length %d
\n
"
,
len
);
print_integral
(
res
,
i
);
wsprintfW
(
res
,
integfmt
,
i
);
memset
(
res
+
lstrlenW
(
res
)
+
1
,
'a'
,
10
*
sizeof
(
WCHAR
));
ok
(
!
memcmp
(
res
,
outW
,
10
*
sizeof
(
WCHAR
)
),
"bad buffer contents for %d
\n
"
,
i
);
if
(
len
<=
1
||
len
>=
7
)
break
;
/* don't bother testing all of them */
...
...
@@ -552,7 +538,7 @@ static void test_local_get_atom_name(void)
WCHAR
res
[
20
];
ok
(
(
len
>
1
)
&&
(
len
<
7
),
"bad length %d
\n
"
,
len
);
print_integral
(
res
,
i
);
wsprintfW
(
res
,
integfmt
,
i
);
memset
(
res
+
lstrlenW
(
res
)
+
1
,
'a'
,
10
*
sizeof
(
WCHAR
));
ok
(
!
memcmp
(
res
,
outW
,
10
*
sizeof
(
WCHAR
)
),
"bad buffer contents for %d
\n
"
,
i
);
}
...
...
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