From: Bruno Haible Date: Wed, 19 Apr 2023 00:10:23 +0000 (+0200) Subject: wmemcmp: Add tests. X-Git-Tag: v1.0~1421 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7634eee7a8da4a2f5eb9522ec01d24b8ad105df7;p=gnulib.git wmemcmp: Add tests. * tests/test-wmemcmp.c (main): Add comment. --- diff --git a/tests/test-wmemcmp.c b/tests/test-wmemcmp.c index 998dff2653..3a85acebf3 100644 --- a/tests/test-wmemcmp.c +++ b/tests/test-wmemcmp.c @@ -63,7 +63,11 @@ main (int argc, char *argv[]) ASSERT (wmemcmp (input2, input1, 4) > 0); } - /* ISO C requires wmemcmp to work with all wchar_t values. */ + /* ISO C requires wcscmp to work with all wchar_t values. + ISO C 17 § 7.29.4.4 says: + "Unless explicitly stated otherwise, the functions described in this + subclause order two wide characters the same way as two integers of + the underlying integer type designated by wchar_t." */ { static const wchar_t input1[] = { (wchar_t) 0x76547654 }; static const wchar_t input2[] = { (wchar_t) 0x9abc9abc };