21 lines · cpp
1//===-- Unittests for wcslen ----------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "hdr/types/size_t.h"10#include "hdr/types/wchar_t.h"11#include "src/wchar/wcslen.h"12#include "test/UnitTest/Test.h"13 14TEST(LlvmLibcWCSLenTest, EmptyString) {15 ASSERT_EQ(size_t{0}, LIBC_NAMESPACE::wcslen(L""));16}17 18TEST(LlvmLibcWCSLenTest, AnyString) {19 ASSERT_EQ(size_t{12}, LIBC_NAMESPACE::wcslen(L"Hello World!"));20}21