Commit f63138d0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ucrtbase: Set invalid parameter handler for all misc tests.

parent 97e47fe0
...@@ -430,6 +430,9 @@ static void test_invalid_parameter_handler(void) ...@@ -430,6 +430,9 @@ static void test_invalid_parameter_handler(void)
ret = p__set_invalid_parameter_handler(NULL); ret = p__set_invalid_parameter_handler(NULL);
ok(ret == global_invalid_parameter_handler, "ret = %p\n", ret); ok(ret == global_invalid_parameter_handler, "ret = %p\n", ret);
ret = p__set_invalid_parameter_handler(global_invalid_parameter_handler);
ok(!ret, "ret != NULL\n");
} }
static void test__get_narrow_winmain_command_line(char *path) static void test__get_narrow_winmain_command_line(char *path)
...@@ -539,8 +542,6 @@ static void test__sopen_dispatch(void) ...@@ -539,8 +542,6 @@ static void test__sopen_dispatch(void)
p__close(fd); p__close(fd);
unlink(tempf); unlink(tempf);
p__set_invalid_parameter_handler(global_invalid_parameter_handler);
SET_EXPECT(global_invalid_parameter_handler); SET_EXPECT(global_invalid_parameter_handler);
fd = 0; fd = 0;
ret = p_sopen_dispatch(tempf, _O_CREAT, _SH_DENYWR, 0xff, &fd, 1); ret = p_sopen_dispatch(tempf, _O_CREAT, _SH_DENYWR, 0xff, &fd, 1);
...@@ -553,8 +554,6 @@ static void test__sopen_dispatch(void) ...@@ -553,8 +554,6 @@ static void test__sopen_dispatch(void)
unlink(tempf); unlink(tempf);
} }
p__set_invalid_parameter_handler(NULL);
free(tempf); free(tempf);
} }
...@@ -578,8 +577,6 @@ static void test__sopen_s(void) ...@@ -578,8 +577,6 @@ static void test__sopen_s(void)
p__close(fd); p__close(fd);
unlink(tempf); unlink(tempf);
p__set_invalid_parameter_handler(global_invalid_parameter_handler);
/* _sopen_s() invokes invalid parameter handler on invalid pmode */ /* _sopen_s() invokes invalid parameter handler on invalid pmode */
SET_EXPECT(global_invalid_parameter_handler); SET_EXPECT(global_invalid_parameter_handler);
fd = 0; fd = 0;
...@@ -587,7 +584,6 @@ static void test__sopen_s(void) ...@@ -587,7 +584,6 @@ static void test__sopen_s(void)
ok(ret == EINVAL, "got %d\n", ret); ok(ret == EINVAL, "got %d\n", ret);
ok(fd == -1, "got fd %d\n", fd); ok(fd == -1, "got fd %d\n", fd);
CHECK_CALLED(global_invalid_parameter_handler); CHECK_CALLED(global_invalid_parameter_handler);
p__set_invalid_parameter_handler(NULL);
free(tempf); free(tempf);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment