summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-19 02:10:23 +0200
committerBruno Haible <bruno@clisp.org>2023-04-19 02:10:23 +0200
commit7634eee7a8da4a2f5eb9522ec01d24b8ad105df7 (patch)
treeb1786db85f012e8d4aebb19c81fb96c481c48653 /tests
parent312f211ba66f4b3f58fdb4399c61c58c0dcf6e75 (diff)
downloadgnulib-7634eee7a8da4a2f5eb9522ec01d24b8ad105df7.tar.gz
wmemcmp: Add tests.
* tests/test-wmemcmp.c (main): Add comment.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-wmemcmp.c6
1 files changed, 5 insertions, 1 deletions
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 };