tests: clarify that tests for C95 conversion functions are skipped for UCRT Signed-off-by: Kirill Makurin <maiddaisuki@outlook.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/testcases/t_mbrlen.c b/mingw-w64-crt/testcases/t_mbrlen.c index e169107..4b1c46c 100644 --- a/mingw-w64-crt/testcases/t_mbrlen.c +++ b/mingw-w64-crt/testcases/t_mbrlen.c
@@ -9,6 +9,16 @@ #include <stdlib.h> #include <wchar.h> +/** + * This test is for mingw-w64's implementation of mbrlen function. + * + * This implementation is used with all msvcr*.dll CRTs, but not UCRT. + * This test is skipped for UCRT. + * + * Also note that mingw-w64's implementation only works with SBCS and DBCS + * code pages (MB_CUR_MAX == 1 || MB_CUR_MAX == 2). + */ + static void set_conversion_state (mbstate_t *state, int bytes) { #ifdef _UCRT state->_Wchar = bytes;
diff --git a/mingw-w64-crt/testcases/t_mbrtowc.c b/mingw-w64-crt/testcases/t_mbrtowc.c index c33cc22..4d97b90 100644 --- a/mingw-w64-crt/testcases/t_mbrtowc.c +++ b/mingw-w64-crt/testcases/t_mbrtowc.c
@@ -9,6 +9,16 @@ #include <stdlib.h> #include <wchar.h> +/** + * This test is for mingw-w64's implementation of mbrtowc function. + * + * This implementation is used with all msvcr*.dll CRTs, but not UCRT. + * This test is skipped for UCRT. + * + * Also note that mingw-w64's implementation only works with SBCS and DBCS + * code pages (MB_CUR_MAX == 1 || MB_CUR_MAX == 2). + */ + static void set_conversion_state (mbstate_t *state, int bytes) { #ifdef _UCRT state->_Wchar = bytes;
diff --git a/mingw-w64-crt/testcases/t_mbsrtowcs.c b/mingw-w64-crt/testcases/t_mbsrtowcs.c index e85719e..e9f60ec 100644 --- a/mingw-w64-crt/testcases/t_mbsrtowcs.c +++ b/mingw-w64-crt/testcases/t_mbsrtowcs.c
@@ -9,6 +9,16 @@ #include <stdlib.h> #include <wchar.h> +/** + * This test is for mingw-w64's implementation of mbsrtowcs function. + * + * This implementation is used with all msvcr*.dll CRTs, but not UCRT. + * This test is skipped for UCRT. + * + * Also note that mingw-w64's implementation only works with SBCS and DBCS + * code pages (MB_CUR_MAX == 1 || MB_CUR_MAX == 2). + */ + /* ASCII text */ char AsciiText[] = "Simple English string."; /* SBCS text (code page 1252) */
diff --git a/mingw-w64-crt/testcases/t_wcrtomb.c b/mingw-w64-crt/testcases/t_wcrtomb.c index 99329f2..f9d1a8d 100644 --- a/mingw-w64-crt/testcases/t_wcrtomb.c +++ b/mingw-w64-crt/testcases/t_wcrtomb.c
@@ -9,6 +9,16 @@ #include <stdlib.h> #include <wchar.h> +/** + * This test is for mingw-w64's implementation of wcrtomb function. + * + * This implementation is used with all msvcr*.dll CRTs, but not UCRT. + * This test is skipped for UCRT. + * + * Also note that mingw-w64's implementation only works with SBCS and DBCS + * code pages (MB_CUR_MAX == 1 || MB_CUR_MAX == 2). + */ + #define WIN32_LEAN_AND_MEAN #include <windows.h>
diff --git a/mingw-w64-crt/testcases/t_wcsrtombs.c b/mingw-w64-crt/testcases/t_wcsrtombs.c index 2a78c78..705cdc2 100644 --- a/mingw-w64-crt/testcases/t_wcsrtombs.c +++ b/mingw-w64-crt/testcases/t_wcsrtombs.c
@@ -10,6 +10,16 @@ #include <string.h> #include <wchar.h> +/** + * This test is for mingw-w64's implementation of wcsrtombs function. + * + * This implementation is used with all msvcr*.dll CRTs, but not UCRT. + * This test is skipped for UCRT. + * + * Also note that mingw-w64's implementation only works with SBCS and DBCS + * code pages (MB_CUR_MAX == 1 || MB_CUR_MAX == 2). + */ + wchar_t AsciiText[] = L"Simple English text."; wchar_t SBCSText[] = L"Sömè fÛnnÿ têxt"; wchar_t DBCSText[] = L"日本語テクスト";