1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
# This file is licensed 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
# LLVM libc unittest library.
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
cc_library(
name = "test_logger",
srcs = ["TestLogger.cpp"],
hdrs = ["TestLogger.h"],
deps = [
"//libc:__support_cpp_string",
"//libc:__support_cpp_string_view",
"//libc:__support_osutil_io",
"//libc:__support_uint128",
"//libc:libc_root",
],
)
cc_library(
name = "LibcUnitTest",
srcs = [
"BazelFilePath.cpp",
"ExecuteFunctionUnix.cpp",
"LibcTest.cpp",
"LibcTestMain.cpp",
],
hdrs = [
"ErrnoSetterMatcher.h",
"ExecuteFunction.h",
"LibcTest.h",
"PlatformDefs.h",
"Test.h",
],
deps = [
":test_logger",
"//libc:__support_c_string",
"//libc:__support_cpp_bit",
"//libc:__support_cpp_bitset",
"//libc:__support_cpp_span",
"//libc:__support_cpp_string",
"//libc:__support_cpp_string_view",
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
"//libc:__support_macros_properties_architectures",
"//libc:__support_stringutil",
"//libc:__support_uint128",
"//libc:errno",
"//libc:libc_root",
"//llvm:Support",
],
)
cc_library(
name = "fp_test_helpers",
srcs = [
"FPExceptMatcher.cpp",
"RoundingModeUtils.cpp",
],
hdrs = [
"FPExceptMatcher.h",
"FPMatcher.h",
"RoundingModeUtils.h",
],
deps = [
":LibcUnitTest",
":string_utils",
"//libc:__support_cpp_bit",
"//libc:__support_cpp_bitset",
"//libc:__support_cpp_span",
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
"//libc:libc_root",
],
)
cc_library(
name = "memory_matcher",
srcs = [
"MemoryMatcher.cpp",
],
hdrs = [
"MemoryMatcher.h",
],
deps = [
":LibcUnitTest",
"//libc:__support_cpp_bit",
"//libc:__support_cpp_bitset",
"//libc:__support_cpp_span",
"//libc:__support_cpp_type_traits",
],
)
cc_library(
name = "printf_matcher",
srcs = [
"PrintfMatcher.cpp",
],
hdrs = [
"PrintfMatcher.h",
],
deps = [
":LibcUnitTest",
":string_utils",
"//libc:__support_fputil_fp_bits",
"//libc:printf_core_structs",
],
)
cc_library(
name = "string_utils",
hdrs = [
"StringUtils.h",
],
deps = [
"//libc:__support_cpp_string",
"//libc:__support_cpp_type_traits",
],
)
|