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
e115d5c7
Commit
e115d5c7
authored
Mar 26, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucrtbase/tests: Set invalid_parameter_handler once.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
792dc349
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
30 deletions
+6
-30
printf.c
dlls/ucrtbase/tests/printf.c
+3
-6
string.c
dlls/ucrtbase/tests/string.c
+3
-24
No files found.
dlls/ucrtbase/tests/printf.c
View file @
e115d5c7
...
...
@@ -376,9 +376,6 @@ static void test_fwprintf(void)
fclose
(
fp
);
unlink
(
file_name
);
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
/* NULL format */
errno
=
0xdeadbeef
;
SET_EXPECT
(
invalid_parameter_handler
);
...
...
@@ -398,9 +395,6 @@ static void test_fwprintf(void)
/* format using % with NULL arglist*/
/* crashes on Windows */
/* ret = __stdio_common_vfwprintf(0, fp, cont_fmt, NULL, NULL); */
ok
(
_set_invalid_parameter_handler
(
NULL
)
==
test_invalid_parameter_handler
,
"Cannot reset invalid parameter handler
\n
"
);
}
static
int
WINAPIV
_vsnprintf_s_wrapper
(
char
*
str
,
size_t
sizeOfBuffer
,
...
...
@@ -628,6 +622,9 @@ static void test_printf_natural_string(void)
START_TEST
(
printf
)
{
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
test_snprintf
();
test_swprintf
();
test_fprintf
();
...
...
dlls/ucrtbase/tests/string.c
View file @
e115d5c7
...
...
@@ -150,9 +150,6 @@ static void test__memicmp(void)
static
const
char
*
s2
=
"aBd"
;
int
ret
;
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
ret
=
_memicmp
(
NULL
,
NULL
,
0
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
...
...
@@ -182,9 +179,6 @@ static void test__memicmp(void)
ret
=
_memicmp
(
s1
,
s2
,
3
);
ok
(
ret
==
-
1
,
"got %d
\n
"
,
ret
);
ok
(
_set_invalid_parameter_handler
(
NULL
)
==
test_invalid_parameter_handler
,
"Cannot reset invalid parameter handler
\n
"
);
}
static
void
test__memicmp_l
(
void
)
...
...
@@ -193,9 +187,6 @@ static void test__memicmp_l(void)
static
const
char
*
s2
=
"aBd"
;
int
ret
;
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
ret
=
_memicmp_l
(
NULL
,
NULL
,
0
,
NULL
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
...
...
@@ -225,9 +216,6 @@ static void test__memicmp_l(void)
ret
=
_memicmp_l
(
s1
,
s2
,
3
,
NULL
);
ok
(
ret
==
-
1
,
"got %d
\n
"
,
ret
);
ok
(
_set_invalid_parameter_handler
(
NULL
)
==
test_invalid_parameter_handler
,
"Cannot reset invalid parameter handler
\n
"
);
}
...
...
@@ -255,17 +243,11 @@ static void test___strncnt(void)
ok
(
ret
==
strncnt_tests
[
i
].
ret
,
"%u: unexpected return value %u.
\n
"
,
i
,
(
int
)
ret
);
}
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
if
(
0
)
/* crashes */
{
ret
=
__strncnt
(
NULL
,
0
);
ret
=
__strncnt
(
NULL
,
1
);
}
ok
(
_set_invalid_parameter_handler
(
NULL
)
==
test_invalid_parameter_handler
,
"Cannot reset invalid parameter handler
\n
"
);
}
static
void
test_C_locale
(
void
)
...
...
@@ -436,9 +418,6 @@ static void test__strnicmp(void)
static
const
char
str2
[]
=
"test"
;
int
ret
;
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
SET_EXPECT
(
invalid_parameter_handler
);
errno
=
0xdeadbeef
;
ret
=
_strnicmp
(
str1
,
str2
,
-
1
);
...
...
@@ -448,13 +427,13 @@ static void test__strnicmp(void)
ret
=
_strnicmp
(
str1
,
str2
,
0x7fffffff
);
ok
(
!
ret
,
"got %d.
\n
"
,
ret
);
ok
(
_set_invalid_parameter_handler
(
NULL
)
==
test_invalid_parameter_handler
,
"Cannot reset invalid parameter handler
\n
"
);
}
START_TEST
(
string
)
{
ok
(
_set_invalid_parameter_handler
(
test_invalid_parameter_handler
)
==
NULL
,
"Invalid parameter handler was already set
\n
"
);
test_strtod
();
test__memicmp
();
test__memicmp_l
();
...
...
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