[libc][windows] fix strlcpy tests
authorMichael Jones <michaelrj@google.com>
Wed, 18 May 2022 18:42:07 +0000 (11:42 -0700)
committerMichael Jones <michaelrj@google.com>
Wed, 18 May 2022 21:11:53 +0000 (14:11 -0700)
commit72f6dfb378751fd48bcd70fefd57e7a31bea501d
treeff4c48947c5d009dd98184466db5fce36204785e
parentf9a3c43eaa97d125595d83565a5d4aafd8dac734
[libc][windows] fix strlcpy tests

Generally, size_t is an alias for unsigned long long. In the strlcpy
tests, the return value of strlcpy (a size_t) is compared to an unsigned
long. On Linux unsigned long and unsigned long long are both 64 bits,
but on windows unsigned long is 32 bits. Since the macros require
identical types for both sides, this caused a build failure on windows.
This patch changes the constants to be explicit size_t values.

Differential Revision: https://reviews.llvm.org/D125917
libc/test/src/string/strlcpy_test.cpp