1 //===-- Unittests for puts ---------------------------------------------===//
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-exception
7 //===----------------------------------------------------------------------===//
9 #include "src/__support/File/file.h"
10 #include "src/stdio/fputs.h"
12 #include "test/UnitTest/Test.h"
14 TEST(LlvmLibcPutsTest
, PrintOut
) {
17 constexpr char simple
[] = "A simple string written to stdout\n";
18 result
= LIBC_NAMESPACE::fputs(
19 simple
, reinterpret_cast<FILE *>(LIBC_NAMESPACE::stdout
));
22 constexpr char more
[] = "A simple string written to stderr\n";
23 result
= LIBC_NAMESPACE::fputs(
24 more
, reinterpret_cast<FILE *>(LIBC_NAMESPACE::stderr
));