• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load(
16    "//pw_build:pigweed.bzl",
17    "pw_cc_library",
18    "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
25pw_cc_library(
26    name = "pw_string",
27    srcs = [
28        "format.cc",
29        "string_builder.cc",
30        "type_to_string.cc",
31    ],
32    hdrs = [
33        "public/pw_string/format.h",
34        "public/pw_string/internal/length.h",
35        "public/pw_string/string_builder.h",
36        "public/pw_string/to_string.h",
37        "public/pw_string/type_to_string.h",
38        "public/pw_string/util.h",
39    ],
40    includes = ["public"],
41    deps = [
42        "//pw_assert:facade",
43        "//pw_preprocessor",
44        "//pw_result",
45        "//pw_span",
46        "//pw_status",
47    ],
48)
49
50pw_cc_test(
51    name = "format_test",
52    srcs = ["format_test.cc"],
53    deps = [
54        ":pw_string",
55        "//pw_span",
56        "//pw_unit_test",
57    ],
58)
59
60pw_cc_test(
61    name = "type_to_string_test",
62    srcs = ["type_to_string_test.cc"],
63    deps = [
64        ":pw_string",
65        "//pw_unit_test",
66    ],
67)
68
69pw_cc_test(
70    name = "string_builder_test",
71    srcs = ["string_builder_test.cc"],
72    deps = [
73        ":pw_string",
74        "//pw_unit_test",
75    ],
76)
77
78pw_cc_test(
79    name = "to_string_test",
80    srcs = ["to_string_test.cc"],
81    deps = [
82        ":pw_string",
83        "//pw_status",
84        "//pw_unit_test",
85    ],
86)
87
88pw_cc_test(
89    name = "util_test",
90    srcs = ["util_test.cc"],
91    deps = [
92        ":pw_string",
93        "//pw_unit_test",
94    ],
95)
96