Author: enh-google Date: 2025-07-08T15:04:06-04:00 New Revision: 423d4220dbc69236fc4c8a98ac75c7780eaece2c
URL: https://github.com/llvm/llvm-project/commit/423d4220dbc69236fc4c8a98ac75c7780eaece2c DIFF: https://github.com/llvm/llvm-project/commit/423d4220dbc69236fc4c8a98ac75c7780eaece2c.diff LOG: Update wcpncpy_test.cpp Added: Modified: libc/test/src/wchar/wcpncpy_test.cpp Removed: ################################################################################ diff --git a/libc/test/src/wchar/wcpncpy_test.cpp b/libc/test/src/wchar/wcpncpy_test.cpp index 5ce3e8ce7cd93..bb72211f6264c 100644 --- a/libc/test/src/wchar/wcpncpy_test.cpp +++ b/libc/test/src/wchar/wcpncpy_test.cpp @@ -45,7 +45,7 @@ TEST(LlvmLibcWCPNCpyTest, CopyNull) { wchar_t *res = LIBC_NAMESPACE::wcpncpy(dest, src, 1); ASSERT_TRUE(dest[0] == L'\0'); ASSERT_TRUE(dest[1] == L'b'); - ASSERT_EQ(dest + 1, res); + ASSERT_EQ(dest, res); } TEST(LlvmLibcWCPNCpyTest, CopyPastSrc) { @@ -54,7 +54,7 @@ TEST(LlvmLibcWCPNCpyTest, CopyPastSrc) { wchar_t *res = LIBC_NAMESPACE::wcpncpy(dest, src, 2); ASSERT_TRUE(dest[0] == L'\0'); ASSERT_TRUE(dest[1] == L'\0'); - ASSERT_EQ(dest + 2, res); + ASSERT_EQ(dest, res); } TEST(LlvmLibcWCPNCpyTest, CopyTwoNoNull) { @@ -72,7 +72,7 @@ TEST(LlvmLibcWCPNCpyTest, CopyTwoWithNull) { wchar_t *res = LIBC_NAMESPACE::wcpncpy(dest, src, 2); ASSERT_TRUE(dest[0] == L'x'); ASSERT_TRUE(dest[1] == L'\0'); - ASSERT_EQ(dest + 2, res); + ASSERT_EQ(dest + 1, res); } TEST(LlvmLibcWCPNCpyTest, CopyAndFill) { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits