xref: /llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel (revision 95b680e4c353d479fbfb96adb39696042c005e99)
1f12be145SGuillaume Chatelet# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2f12be145SGuillaume Chatelet# See https://llvm.org/LICENSE.txt for license information.
3f12be145SGuillaume Chatelet# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4f12be145SGuillaume Chatelet
5f12be145SGuillaume Chatelet# Tests for LLVM libc __support functions.
6f12be145SGuillaume Chatelet
7f12be145SGuillaume Chateletload("//libc/test:libc_test_rules.bzl", "libc_test")
8f12be145SGuillaume Chatelet
9f12be145SGuillaume Chateletpackage(default_visibility = ["//visibility:public"])
10f12be145SGuillaume Chatelet
11f12be145SGuillaume Chateletlicenses(["notice"])
12f12be145SGuillaume Chatelet
13c4448793SGuillaume Chateletlibc_test(
14c4448793SGuillaume Chatelet    name = "math_extras_test",
15c4448793SGuillaume Chatelet    srcs = ["math_extras_test.cpp"],
16c103d573SGuillaume Chatelet    deps = [
17c103d573SGuillaume Chatelet        "//libc:__support_integer_literals",
18c103d573SGuillaume Chatelet        "//libc:__support_math_extras",
19c103d573SGuillaume Chatelet        "//libc:__support_uint128",
20c103d573SGuillaume Chatelet    ],
21c4448793SGuillaume Chatelet)
22c4448793SGuillaume Chatelet
23f12be145SGuillaume Chatelet# This test is currently disabled because of an issue in
24f12be145SGuillaume Chatelet# `libc/src/__support/CPP/new.h` which currently fails with
25f12be145SGuillaume Chatelet# "error: cannot apply asm label to function after its first use"
26f12be145SGuillaume Chatelet# libc_test(
27f12be145SGuillaume Chatelet#     name = "blockstore_test",
28f12be145SGuillaume Chatelet#     srcs = ["blockstore_test.cpp"],
29f12be145SGuillaume Chatelet#     deps = ["//libc:__support_blockstore"],
30f12be145SGuillaume Chatelet# )
31f12be145SGuillaume Chatelet
32f12be145SGuillaume Chateletlibc_test(
33*95b680e4SDaniel Thornburgh    name = "endian_internal_test",
34*95b680e4SDaniel Thornburgh    srcs = ["endian_internal_test.cpp"],
35f12be145SGuillaume Chatelet    deps = ["//libc:__support_common"],
36f12be145SGuillaume Chatelet)
37f12be145SGuillaume Chatelet
38f12be145SGuillaume Chateletlibc_test(
39f12be145SGuillaume Chatelet    name = "high_precision_decimal_test",
40f12be145SGuillaume Chatelet    srcs = ["high_precision_decimal_test.cpp"],
41f12be145SGuillaume Chatelet    deps = [
42f12be145SGuillaume Chatelet        "//libc:__support_str_to_float",
43f12be145SGuillaume Chatelet        "//libc:__support_uint128",
44f12be145SGuillaume Chatelet    ],
45f12be145SGuillaume Chatelet)
46f12be145SGuillaume Chatelet
47f12be145SGuillaume Chateletlibc_test(
48f12be145SGuillaume Chatelet    name = "str_to_float_test",
49b4fa7f4cSGuillaume Chatelet    srcs = [
50b4fa7f4cSGuillaume Chatelet        "str_to_double_test.cpp",
51b4fa7f4cSGuillaume Chatelet        "str_to_float_test.cpp",
52b4fa7f4cSGuillaume Chatelet        "str_to_fp_test.h",
53b4fa7f4cSGuillaume Chatelet        "str_to_long_double_test.cpp",
54b4fa7f4cSGuillaume Chatelet    ],
55f12be145SGuillaume Chatelet    deps = [
56c2399147SGuillaume Chatelet        "//libc:__support_fputil_fp_bits",
57a80a01fcSGuillaume Chatelet        "//libc:__support_integer_literals",
58f12be145SGuillaume Chatelet        "//libc:__support_str_to_float",
59f12be145SGuillaume Chatelet        "//libc:__support_uint128",
60f12be145SGuillaume Chatelet    ],
61f12be145SGuillaume Chatelet)
62f12be145SGuillaume Chatelet
63f12be145SGuillaume Chateletlibc_test(
64f12be145SGuillaume Chatelet    name = "integer_to_string_test",
65f12be145SGuillaume Chatelet    srcs = ["integer_to_string_test.cpp"],
66f12be145SGuillaume Chatelet    deps = [
6709efe848SGuillaume Chatelet        "//libc:__support_big_int",
68096d061cSSterling Augustine        "//libc:__support_cpp_limits",
69e4f71959SJordan Rupprecht        "//libc:__support_cpp_span",
70f12be145SGuillaume Chatelet        "//libc:__support_cpp_string_view",
71a80a01fcSGuillaume Chatelet        "//libc:__support_integer_literals",
72f12be145SGuillaume Chatelet        "//libc:__support_integer_to_string",
73f12be145SGuillaume Chatelet        "//libc:__support_uint128",
74f12be145SGuillaume Chatelet    ],
75f12be145SGuillaume Chatelet)
76f12be145SGuillaume Chatelet
77f12be145SGuillaume Chateletlibc_test(
78f12be145SGuillaume Chatelet    name = "arg_list_test",
79f12be145SGuillaume Chatelet    srcs = ["arg_list_test.cpp"],
80f12be145SGuillaume Chatelet    deps = [
81f12be145SGuillaume Chatelet        "//libc:__support_arg_list",
8259731eebSMikhail Goncharov        "//libc:__support_macros_properties_os",
83f12be145SGuillaume Chatelet    ],
84f12be145SGuillaume Chatelet)
85f12be145SGuillaume Chatelet
86f12be145SGuillaume Chateletlibc_test(
87fc7087b7SGuillaume Chatelet    name = "big_int_test",
88fc7087b7SGuillaume Chatelet    srcs = ["big_int_test.cpp"],
89f12be145SGuillaume Chatelet    deps = [
9009efe848SGuillaume Chatelet        "//libc:__support_big_int",
91f12be145SGuillaume Chatelet        "//libc:__support_cpp_optional",
9271c3f5d6SGuillaume Chatelet        "//libc:__support_integer_literals",
9323c397c7SGuillaume Chatelet        "//libc:__support_macros_properties_types",
945748ad84Slntue        "//libc:hdr_math_macros",
9509efe848SGuillaume Chatelet        "//libc:llvm_libc_macros_math_macros",
96f12be145SGuillaume Chatelet    ],
97f12be145SGuillaume Chatelet)
98f12be145SGuillaume Chatelet
99f12be145SGuillaume Chateletlibc_test(
100f12be145SGuillaume Chatelet    name = "fixedvector_test",
101f12be145SGuillaume Chatelet    srcs = ["fixedvector_test.cpp"],
102f12be145SGuillaume Chatelet    deps = [
1035d0308f3SHaojian Wu        "//libc:__support_cpp_array",
104f12be145SGuillaume Chatelet        "//libc:__support_fixedvector",
105f12be145SGuillaume Chatelet    ],
106f12be145SGuillaume Chatelet)
107f12be145SGuillaume Chatelet
108f12be145SGuillaume Chateletlibc_test(
109f12be145SGuillaume Chatelet    name = "char_vector_test",
110f12be145SGuillaume Chatelet    srcs = ["char_vector_test.cpp"],
111f12be145SGuillaume Chatelet    deps = [
112f12be145SGuillaume Chatelet        "//libc:__support_char_vector",
113f12be145SGuillaume Chatelet    ],
114f12be145SGuillaume Chatelet)
11503232350SGuillaume Chatelet
11603232350SGuillaume Chateletlibc_test(
11703232350SGuillaume Chatelet    name = "integer_literals_test",
11803232350SGuillaume Chatelet    srcs = ["integer_literals_test.cpp"],
11903232350SGuillaume Chatelet    deps = [
12003232350SGuillaume Chatelet        "//libc:__support_integer_literals",
12123c397c7SGuillaume Chatelet        "//libc:__support_macros_properties_types",
12203232350SGuillaume Chatelet    ],
12303232350SGuillaume Chatelet)
124