1# This file is licensed under the Apache License v2.0 with LLVM Exceptions. 2# See https://llvm.org/LICENSE.txt for license information. 3# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 4 5# Tests for LLVM libc stdio.h functions. 6 7load("//libc/test:libc_test_rules.bzl", "libc_test") 8 9package(default_visibility = ["//visibility:public"]) 10 11licenses(["notice"]) 12 13libc_test( 14 name = "printf_parser_test", 15 srcs = ["printf_core/parser_test.cpp"], 16 libc_function_deps = [ 17 ], 18 deps = [ 19 "//libc:__support_arg_list", 20 "//libc:__support_cpp_bit", 21 "//libc:__support_cpp_string_view", 22 "//libc:printf_core_structs", 23 "//libc:printf_parser", 24 "//libc/test/UnitTest:printf_matcher", 25 ], 26) 27 28libc_test( 29 name = "printf_writer_test", 30 srcs = ["printf_core/writer_test.cpp"], 31 libc_function_deps = [ 32 ], 33 deps = [ 34 "//libc:__support_arg_list", 35 "//libc:__support_cpp_string_view", 36 "//libc:printf_core_structs", 37 "//libc:printf_writer", 38 "//libc:string_memory_utils", 39 ], 40) 41 42libc_test( 43 name = "printf_converter_test", 44 srcs = ["printf_core/converter_test.cpp"], 45 libc_function_deps = [ 46 ], 47 deps = [ 48 "//libc:__support_arg_list", 49 "//libc:__support_cpp_string_view", 50 "//libc:printf_converter", 51 "//libc:printf_core_structs", 52 "//libc:printf_writer", 53 ], 54) 55 56libc_test( 57 name = "sprintf_test", 58 srcs = ["sprintf_test.cpp"], 59 libc_function_deps = [ 60 "//libc:sprintf", 61 ], 62 deps = [ 63 "//libc:__support_fputil_fp_bits", 64 "//libc/test/UnitTest:fp_test_helpers", 65 ], 66) 67 68libc_test( 69 name = "snprintf_test", 70 srcs = ["snprintf_test.cpp"], 71 libc_function_deps = [ 72 "//libc:snprintf", 73 ], 74) 75 76libc_test( 77 name = "printf_test", 78 srcs = ["printf_test.cpp"], 79 libc_function_deps = [ 80 "//libc:printf", 81 ], 82) 83 84libc_test( 85 name = "fprintf_test", 86 srcs = ["fprintf_test.cpp"], 87 libc_function_deps = [ 88 "//libc:fprintf", 89 ], 90) 91 92libc_test( 93 name = "vsprintf_test", 94 srcs = ["vsprintf_test.cpp"], 95 libc_function_deps = [ 96 "//libc:vsprintf", 97 ], 98) 99 100libc_test( 101 name = "vsnprintf_test", 102 srcs = ["vsnprintf_test.cpp"], 103 libc_function_deps = [ 104 "//libc:vsnprintf", 105 ], 106) 107 108libc_test( 109 name = "vprintf_test", 110 srcs = ["vprintf_test.cpp"], 111 libc_function_deps = [ 112 "//libc:vprintf", 113 ], 114) 115 116libc_test( 117 name = "vfprintf_test", 118 srcs = ["vfprintf_test.cpp"], 119 libc_function_deps = [ 120 "//libc:vfprintf", 121 ], 122) 123 124libc_test( 125 name = "remove_test", 126 srcs = ["remove_test.cpp"], 127 libc_function_deps = [ 128 "//libc:remove", 129 "//libc:open", 130 "//libc:mkdirat", 131 "//libc:access", 132 "//libc:close", 133 ], 134) 135