Skip to content

Commit b4650a4

Browse files
[libc][bazel] Add tests and targets for inttypes (#158127)
Adds tests and targets for the remaining inttypes functions.
1 parent 162755b commit b4650a4

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4609,6 +4609,28 @@ libc_math_function(name = "ufromfpxf16")
46094609

46104610
############################## inttypes targets ##############################
46114611

4612+
libc_function(
4613+
name = "strtoimax",
4614+
srcs = ["src/inttypes/strtoimax.cpp"],
4615+
hdrs = ["src/inttypes/strtoimax.h"],
4616+
deps = [
4617+
":__support_common",
4618+
":__support_str_to_integer",
4619+
":errno",
4620+
],
4621+
)
4622+
4623+
libc_function(
4624+
name = "strtoumax",
4625+
srcs = ["src/inttypes/strtoumax.cpp"],
4626+
hdrs = ["src/inttypes/strtoumax.h"],
4627+
deps = [
4628+
":__support_common",
4629+
":__support_str_to_integer",
4630+
":errno",
4631+
],
4632+
)
4633+
46124634
libc_function(
46134635
name = "imaxabs",
46144636
srcs = ["src/inttypes/imaxabs.cpp"],

utils/bazel/llvm-project-overlay/libc/test/src/inttypes/BUILD.bazel

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ package(default_visibility = ["//visibility:public"])
1010

1111
licenses(["notice"])
1212

13+
libc_test(
14+
name = "strtoimax_test",
15+
srcs = ["strtoimax_test.cpp"],
16+
deps = [
17+
"//libc:strtoimax",
18+
"//libc/test/src/stdlib:strtol_test_helper",
19+
],
20+
)
21+
22+
libc_test(
23+
name = "strtoumax_test",
24+
srcs = ["strtoumax_test.cpp"],
25+
deps = [
26+
"//libc:strtoumax",
27+
"//libc/test/src/stdlib:strtol_test_helper",
28+
],
29+
)
30+
1331
libc_test(
1432
name = "imaxabs_test",
1533
srcs = ["imaxabs_test.cpp"],

0 commit comments

Comments
 (0)