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
5ca70071
Commit
5ca70071
authored
Oct 08, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Use LONG instead of long.
parent
c68324df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
string.c
dlls/msvcrt/tests/string.c
+9
-9
No files found.
dlls/msvcrt/tests/string.c
View file @
5ca70071
...
...
@@ -666,40 +666,40 @@ static void test_strtok(void)
static
void
test_strtol
(
void
)
{
char
*
e
;
long
l
;
unsigned
long
ul
;
LONG
l
;
ULONG
ul
;
/* errno is only set in case of error, so reset errno to EBADF to check for errno modification */
/* errno is modified on W2K8+ */
errno
=
EBADF
;
l
=
strtol
(
"-1234"
,
&
e
,
0
);
ok
(
l
==-
1234
,
"wrong value %
l
d
\n
"
,
l
);
ok
(
l
==-
1234
,
"wrong value %d
\n
"
,
l
);
ok
(
errno
==
EBADF
||
broken
(
errno
==
0
),
"wrong errno %d
\n
"
,
errno
);
errno
=
EBADF
;
ul
=
strtoul
(
"1234"
,
&
e
,
0
);
ok
(
ul
==
1234
,
"wrong value %
l
u
\n
"
,
ul
);
ok
(
ul
==
1234
,
"wrong value %u
\n
"
,
ul
);
ok
(
errno
==
EBADF
||
broken
(
errno
==
0
),
"wrong errno %d
\n
"
,
errno
);
errno
=
EBADF
;
l
=
strtol
(
"2147483647L"
,
&
e
,
0
);
ok
(
l
==
2147483647
,
"wrong value %
l
d
\n
"
,
l
);
ok
(
l
==
2147483647
,
"wrong value %d
\n
"
,
l
);
ok
(
errno
==
EBADF
||
broken
(
errno
==
0
),
"wrong errno %d
\n
"
,
errno
);
errno
=
EBADF
;
l
=
strtol
(
"-2147483648L"
,
&
e
,
0
);
ok
(
l
==-
2147483647L
-
1
,
"wrong value %
l
d
\n
"
,
l
);
ok
(
l
==-
2147483647L
-
1
,
"wrong value %d
\n
"
,
l
);
ok
(
errno
==
EBADF
||
broken
(
errno
==
0
),
"wrong errno %d
\n
"
,
errno
);
errno
=
EBADF
;
ul
=
strtoul
(
"4294967295UL"
,
&
e
,
0
);
ok
(
ul
==
4294967295ul
,
"wrong value %
l
u
\n
"
,
ul
);
ok
(
ul
==
4294967295ul
,
"wrong value %u
\n
"
,
ul
);
ok
(
errno
==
EBADF
||
broken
(
errno
==
0
),
"wrong errno %d
\n
"
,
errno
);
errno
=
0
;
l
=
strtol
(
"9223372036854775807L"
,
&
e
,
0
);
ok
(
l
==
2147483647
,
"wrong value %
l
d
\n
"
,
l
);
ok
(
l
==
2147483647
,
"wrong value %d
\n
"
,
l
);
ok
(
errno
==
ERANGE
,
"wrong errno %d
\n
"
,
errno
);
errno
=
0
;
ul
=
strtoul
(
"9223372036854775807L"
,
&
e
,
0
);
ok
(
ul
==
4294967295ul
,
"wrong value %
l
u
\n
"
,
ul
);
ok
(
ul
==
4294967295ul
,
"wrong value %u
\n
"
,
ul
);
ok
(
errno
==
ERANGE
,
"wrong errno %d
\n
"
,
errno
);
}
...
...
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