Author: akhaldi
Date: Wed May 21 13:20:38 2014
New Revision: 63399
URL:
http://svn.reactos.org/svn/reactos?rev=63399&view=rev
Log:
[MSVCRT_CRT_APITEST]
* Don't reply on _set_errno() which shouldn't be exported.
Modified:
trunk/rostests/apitests/crt/mbstowcs_s.c
trunk/rostests/apitests/crt/wcstombs_s.c
Modified: trunk/rostests/apitests/crt/mbstowcs_s.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/crt/mbstowcs_s.c…
==============================================================================
--- trunk/rostests/apitests/crt/mbstowcs_s.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/crt/mbstowcs_s.c [iso-8859-1] Wed May 21 13:20:38 2014
@@ -54,7 +54,7 @@
size_t cchConverted;
wchar_t widechar[10];
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
widechar[5] = 0xFF;
ret = mbstowcs_s(&cchConverted, widechar, 6, "hallo", 5);
@@ -64,7 +64,7 @@
ok_wstr(widechar, L"hallo");
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
widechar[0] = 0xFF;
ret = mbstowcs_s(&cchConverted, widechar, 1, "", 0);
@@ -73,7 +73,7 @@
ok_wchar(widechar[0], 0);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
widechar[0] = 0xFF;
widechar[1] = 0xFF;
@@ -92,7 +92,7 @@
ok_wchar(widechar[0], 0);
ok_errno(ERANGE);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
widechar[0] = 0xFF;
widechar[1] = 0xFF;
@@ -111,64 +111,64 @@
ok_wchar(widechar[0], 0);
ok_errno(ERANGE);
- _set_errno(0);
+ *_errno() = 0;
ret = mbstowcs_s(0, 0, 0, 0, 0);
ok_long(ret, EINVAL);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, 0, 0, 0, 0);
ok_long(ret, EINVAL);
ok_size_t(cchConverted, 0);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
widechar[0] = L'x';
ret = mbstowcs_s(0, widechar, 0, 0, 0);
ok_long(ret, EINVAL);
ok_wchar(widechar[0], L'x');
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
ret = mbstowcs_s(0, widechar, 10, "hallo", 5);
ok_long(ret, 0);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
ret = mbstowcs_s(0, widechar, 0, "hallo", 5);
ok_long(ret, EINVAL);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, 0, 10, "hallo", 5);
ok_long(ret, EINVAL);
ok_size_t(cchConverted, 0xf00bac);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, 0, 0, "hallo", 5);
ok_long(ret, 0);
ok_size_t(cchConverted, 6);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, widechar, 10, 0, 5);
ok_long(ret, EINVAL);
ok_size_t(cchConverted, 0);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, widechar, 10, "hallo", 0);
ok_long(ret, 0);
ok_size_t(cchConverted, 1);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
widechar[0] = 0xABCD;
widechar[1] = 0xABCD;
@@ -187,28 +187,28 @@
ok_wchar(widechar[0], L'h');
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, widechar, 10, 0, 0);
ok_long(ret, 0);
ok_size_t(cchConverted, 1);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, widechar, 10, "hallo", 7);
ok_long(ret, 0);
ok_size_t(cchConverted, 6);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, 0, 0, "hallo", 7);
ok_long(ret, 0);
ok_size_t(cchConverted, 6);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
widechar[0] = 0xABCD;
widechar[1] = 0xABCD;
@@ -227,7 +227,7 @@
ok_wchar(widechar[0], L'h');
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = mbstowcs_s(&cchConverted, widechar, 10, "hallo", -1);
ok_long(ret, 0);
Modified: trunk/rostests/apitests/crt/wcstombs_s.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/crt/wcstombs_s.c…
==============================================================================
--- trunk/rostests/apitests/crt/wcstombs_s.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/crt/wcstombs_s.c [iso-8859-1] Wed May 21 13:20:38 2014
@@ -36,7 +36,7 @@
size_t cchConverted;
char mbsbuffer[10];
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
mbsbuffer[5] = 0xFF;
ret = wcstombs_s(&cchConverted, mbsbuffer, 6, L"hallo", 5);
@@ -46,7 +46,7 @@
ok_str(mbsbuffer, "hallo");
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
mbsbuffer[0] = 0xFF;
ret = wcstombs_s(&cchConverted, mbsbuffer, 1, L"", 0);
@@ -55,7 +55,7 @@
ok_wchar(mbsbuffer[0], 0);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
mbsbuffer[0] = 0xFF;
mbsbuffer[1] = 0xFF;
@@ -74,7 +74,7 @@
ok_char(mbsbuffer[0], 0);
ok_errno(ERANGE);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
mbsbuffer[0] = 0xFF;
mbsbuffer[1] = 0xFF;
@@ -93,64 +93,64 @@
ok_char(mbsbuffer[0], 0);
ok_errno(ERANGE);
- _set_errno(0);
+ *_errno() = 0;
ret = wcstombs_s(0, 0, 0, 0, 0);
ok_long(ret, EINVAL);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, 0, 0, 0, 0);
ok_long(ret, EINVAL);
ok_size_t(cchConverted, 0);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
mbsbuffer[0] = L'x';
ret = wcstombs_s(0, mbsbuffer, 0, 0, 0);
ok_long(ret, EINVAL);
ok_char(mbsbuffer[0], L'x');
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
ret = wcstombs_s(0, mbsbuffer, 10, L"hallo", 5);
ok_long(ret, 0);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
ret = wcstombs_s(0, mbsbuffer, 0, L"hallo", 5);
ok_long(ret, EINVAL);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, 0, 10, L"hallo", 5);
ok_long(ret, EINVAL);
ok_size_t(cchConverted, 0xf00bac);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, 0, 0, L"hallo", 5);
ok_long(ret, 0);
ok_size_t(cchConverted, 6);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, mbsbuffer, 10, 0, 5);
ok_long(ret, EINVAL);
ok_size_t(cchConverted, 0);
ok_errno(EINVAL);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, mbsbuffer, 10, L"hallo", 0);
ok_long(ret, 0);
ok_size_t(cchConverted, 1);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
mbsbuffer[0] = 0xAB;
mbsbuffer[1] = 0xCD;
@@ -169,28 +169,28 @@
ok_char(mbsbuffer[0], L'h');
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, mbsbuffer, 10, 0, 0);
ok_long(ret, 0);
ok_size_t(cchConverted, 1);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, mbsbuffer, 10, L"hallo", 7);
ok_long(ret, 0);
ok_size_t(cchConverted, 6);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, 0, 0, L"hallo", 7);
ok_long(ret, 0);
ok_size_t(cchConverted, 6);
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
mbsbuffer[0] = 0xAB;
mbsbuffer[1] = 0xCD;
@@ -209,7 +209,7 @@
ok_char(mbsbuffer[0], L'h');
ok_errno(0);
- _set_errno(0);
+ *_errno() = 0;
cchConverted = 0xf00bac;
ret = wcstombs_s(&cchConverted, mbsbuffer, 10, L"hallo", -1);
ok_long(ret, 0);