199047c05SMichael Jones# This file is licensed under the Apache License v2.0 with LLVM Exceptions. 299047c05SMichael Jones# See https://llvm.org/LICENSE.txt for license information. 399047c05SMichael Jones# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 499047c05SMichael Jones 599047c05SMichael Jones# Tests for LLVM libc stdio.h functions. 699047c05SMichael Jones 799047c05SMichael Jonesload("//libc/test:libc_test_rules.bzl", "libc_test") 899047c05SMichael Jones 999047c05SMichael Jonespackage(default_visibility = ["//visibility:public"]) 1099047c05SMichael Jones 1199047c05SMichael Joneslicenses(["notice"]) 1299047c05SMichael Jones 1399047c05SMichael Joneslibc_test( 1499047c05SMichael Jones name = "printf_parser_test", 1599047c05SMichael Jones srcs = ["printf_core/parser_test.cpp"], 1699047c05SMichael Jones libc_function_deps = [ 1799047c05SMichael Jones ], 1899047c05SMichael Jones deps = [ 1999047c05SMichael Jones "//libc:__support_arg_list", 20b28614c4SMikhail Goncharov "//libc:__support_cpp_bit", 21b28614c4SMikhail Goncharov "//libc:__support_cpp_string_view", 22b28614c4SMikhail Goncharov "//libc:printf_core_structs", 23b28614c4SMikhail Goncharov "//libc:printf_parser", 2499047c05SMichael Jones "//libc/test/UnitTest:printf_matcher", 2599047c05SMichael Jones ], 2699047c05SMichael Jones) 2799047c05SMichael Jones 2899047c05SMichael Joneslibc_test( 29b9f6c208SMichael Jones name = "printf_writer_test", 30b9f6c208SMichael Jones srcs = ["printf_core/writer_test.cpp"], 3199047c05SMichael Jones libc_function_deps = [ 3299047c05SMichael Jones ], 3399047c05SMichael Jones deps = [ 34d94fe972SMichael Jones "//libc:__support_arg_list", 35d94fe972SMichael Jones "//libc:__support_cpp_string_view", 36d94fe972SMichael Jones "//libc:printf_core_structs", 3799047c05SMichael Jones "//libc:printf_writer", 38b9f6c208SMichael Jones "//libc:string_memory_utils", 3999047c05SMichael Jones ], 4099047c05SMichael Jones) 4199047c05SMichael Jones 4299047c05SMichael Joneslibc_test( 4399047c05SMichael Jones name = "printf_converter_test", 4499047c05SMichael Jones srcs = ["printf_core/converter_test.cpp"], 4599047c05SMichael Jones libc_function_deps = [ 4699047c05SMichael Jones ], 4799047c05SMichael Jones deps = [ 48d94fe972SMichael Jones "//libc:__support_arg_list", 49d94fe972SMichael Jones "//libc:__support_cpp_string_view", 5099047c05SMichael Jones "//libc:printf_converter", 51d94fe972SMichael Jones "//libc:printf_core_structs", 5299047c05SMichael Jones "//libc:printf_writer", 5399047c05SMichael Jones ], 5499047c05SMichael Jones) 5599047c05SMichael Jones 5699047c05SMichael Joneslibc_test( 5799047c05SMichael Jones name = "sprintf_test", 5899047c05SMichael Jones srcs = ["sprintf_test.cpp"], 5999047c05SMichael Jones libc_function_deps = [ 6099047c05SMichael Jones "//libc:sprintf", 6199047c05SMichael Jones ], 6299047c05SMichael Jones deps = [ 6399047c05SMichael Jones "//libc:__support_fputil_fp_bits", 64447d59e0SSiva Chandra Reddy "//libc/test/UnitTest:fp_test_helpers", 6599047c05SMichael Jones ], 6699047c05SMichael Jones) 6799047c05SMichael Jones 6899047c05SMichael Joneslibc_test( 6999047c05SMichael Jones name = "snprintf_test", 7099047c05SMichael Jones srcs = ["snprintf_test.cpp"], 7199047c05SMichael Jones libc_function_deps = [ 7299047c05SMichael Jones "//libc:snprintf", 7399047c05SMichael Jones ], 7499047c05SMichael Jones) 75d94fe972SMichael Jones 76d94fe972SMichael Joneslibc_test( 77d94fe972SMichael Jones name = "printf_test", 78d94fe972SMichael Jones srcs = ["printf_test.cpp"], 79d94fe972SMichael Jones libc_function_deps = [ 80d94fe972SMichael Jones "//libc:printf", 81d94fe972SMichael Jones ], 82d94fe972SMichael Jones) 83d94fe972SMichael Jones 84d94fe972SMichael Joneslibc_test( 85d94fe972SMichael Jones name = "fprintf_test", 86d94fe972SMichael Jones srcs = ["fprintf_test.cpp"], 87d94fe972SMichael Jones libc_function_deps = [ 88d94fe972SMichael Jones "//libc:fprintf", 89d94fe972SMichael Jones ], 90d94fe972SMichael Jones) 9116d5c242SMichael Jones 9216d5c242SMichael Joneslibc_test( 9316d5c242SMichael Jones name = "vsprintf_test", 9416d5c242SMichael Jones srcs = ["vsprintf_test.cpp"], 9516d5c242SMichael Jones libc_function_deps = [ 9616d5c242SMichael Jones "//libc:vsprintf", 9716d5c242SMichael Jones ], 9816d5c242SMichael Jones) 9916d5c242SMichael Jones 10016d5c242SMichael Joneslibc_test( 10116d5c242SMichael Jones name = "vsnprintf_test", 10216d5c242SMichael Jones srcs = ["vsnprintf_test.cpp"], 10316d5c242SMichael Jones libc_function_deps = [ 10416d5c242SMichael Jones "//libc:vsnprintf", 10516d5c242SMichael Jones ], 10616d5c242SMichael Jones) 10716d5c242SMichael Jones 10816d5c242SMichael Joneslibc_test( 10916d5c242SMichael Jones name = "vprintf_test", 11016d5c242SMichael Jones srcs = ["vprintf_test.cpp"], 11116d5c242SMichael Jones libc_function_deps = [ 11216d5c242SMichael Jones "//libc:vprintf", 11316d5c242SMichael Jones ], 11416d5c242SMichael Jones) 11516d5c242SMichael Jones 11616d5c242SMichael Joneslibc_test( 11716d5c242SMichael Jones name = "vfprintf_test", 11816d5c242SMichael Jones srcs = ["vfprintf_test.cpp"], 11916d5c242SMichael Jones libc_function_deps = [ 12016d5c242SMichael Jones "//libc:vfprintf", 12116d5c242SMichael Jones ], 12216d5c242SMichael Jones) 123*7a7d5481Smichaelrj-google 124*7a7d5481Smichaelrj-googlelibc_test( 125*7a7d5481Smichaelrj-google name = "remove_test", 126*7a7d5481Smichaelrj-google srcs = ["remove_test.cpp"], 127*7a7d5481Smichaelrj-google libc_function_deps = [ 128*7a7d5481Smichaelrj-google "//libc:remove", 129*7a7d5481Smichaelrj-google "//libc:open", 130*7a7d5481Smichaelrj-google "//libc:mkdirat", 131*7a7d5481Smichaelrj-google "//libc:access", 132*7a7d5481Smichaelrj-google "//libc:close", 133*7a7d5481Smichaelrj-google ], 134*7a7d5481Smichaelrj-google) 135