| //===-- Unittests for strcat ----------------------------------------------===// |
| // 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 "src/string/strcat.h" |
| #include "utils/UnitTest/Test.h" |
| TEST(LlvmLibcStrCatTest, EmptyDest) { |
| char *result = __llvm_libc::strcat(dest, abc); |
| ASSERT_STREQ(dest, result); |
| TEST(LlvmLibcStrCatTest, NonEmptyDest) { |
| char *result = __llvm_libc::strcat(dest, abc); |
| ASSERT_STREQ(dest, result); |
| ASSERT_STREQ(dest, "xyzabc"); |