[libc-commits] [libc] [libc] mbtowc implementation (PR #145405)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Mon Jun 23 15:49:35 PDT 2025


================
@@ -0,0 +1,152 @@
+//===-- Unittests for mbtowc ---------------------------------------------===//
+//
+// 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/wchar_t.h"
+#include "src/__support/libc_errno.h"
+#include "src/wchar/mbtowc.h"
+#include "test/UnitTest/ErrnoCheckingTest.h"
+#include "test/UnitTest/Test.h"
+
+TEST(LlvmLibcMBToWC, OneByte) {
----------------
michaelrj-google wrote:

Need to add `using LlvmLibcMBToWCTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest;` and change these to `TEST_F(LlvmLibcMBToWCTest, ...`

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


More information about the libc-commits mailing list