[libc-commits] [libc] [llvm] [libc] wcslcpy implementation (PR #146571)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Jul 8 10:52:36 PDT 2025


================
@@ -0,0 +1,51 @@
+//===-- Unittests for wcslcpy ---------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "hdr/types/size_t.h"
+#include "hdr/types/wchar_t.h"
+#include "src/wchar/wcslcpy.h"
+#include "test/UnitTest/Test.h"
+
+TEST(LlvmLibcWCSLCpyTest, BiggerSource) {
----------------
michaelrj-google wrote:

add a test checking that it doesn't copy anything after a null byte in src.

https://github.com/llvm/llvm-project/pull/146571


More information about the libc-commits mailing list