//===-- Unittests for fprintf ---------------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// #ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE #include "src/stdio/fclose.h" #include "src/stdio/ferror.h" #include "src/stdio/fopen.h" #include "src/stdio/fread.h" #endif // LIBC_COPT_STDIO_USE_SYSTEM_FILE #include "src/stdio/fprintf.h" #include "test/UnitTest/Test.h" namespace printf_test { #ifndef LIBC_COPT_STDIO_USE_SYSTEM_FILE using LIBC_NAMESPACE::fclose; using LIBC_NAMESPACE::ferror; using LIBC_NAMESPACE::fopen; using LIBC_NAMESPACE::fread; #else // defined(LIBC_COPT_STDIO_USE_SYSTEM_FILE) fclose; ferror; fopen; fread; #endif // LIBC_COPT_STDIO_USE_SYSTEM_FILE } // namespace printf_test TEST(LlvmLibcFPrintfTest, WriteToFile) { … }