From 7634eee7a8da4a2f5eb9522ec01d24b8ad105df7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 19 Apr 2023 02:10:23 +0200 Subject: wmemcmp: Add tests. * tests/test-wmemcmp.c (main): Add comment. --- tests/test-wmemcmp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') 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 }; -- cgit v1.2.1