Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 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 | |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 17 | "pw_cc_library", |
| 18 | "pw_cc_test", |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 19 | ) |
| 20 | |
Rob Mohr | c278750 | 2019-11-19 09:50:42 -0800 | [diff] [blame] | 21 | package(default_visibility = ["//visibility:public"]) |
| 22 | |
| 23 | licenses(["notice"]) # Apache License 2.0 |
| 24 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 25 | pw_cc_library( |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 26 | name = "pw_string", |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 27 | srcs = [ |
| 28 | "format.cc", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 29 | "string_builder.cc", |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 30 | "type_to_string.cc", |
| 31 | ], |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 32 | hdrs = [ |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 33 | "public/pw_string/format.h", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 34 | "public/pw_string/string_builder.h", |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 35 | "public/pw_string/to_string.h", |
| 36 | "public/pw_string/type_to_string.h", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 37 | "public/pw_string/util.h", |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 38 | ], |
Wyatt Hepler | 61def0a | 2020-01-06 10:30:14 -0800 | [diff] [blame] | 39 | includes = ["public"], |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 40 | deps = [ |
| 41 | "//pw_preprocessor", |
| 42 | "//pw_span", |
| 43 | "//pw_status", |
| 44 | ], |
| 45 | ) |
| 46 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 47 | pw_cc_test( |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 48 | name = "format_test", |
| 49 | srcs = ["format_test.cc"], |
Rob Mohr | c8dd7fd | 2019-11-19 09:15:26 -0800 | [diff] [blame] | 50 | deps = [ |
| 51 | "//pw_span", |
| 52 | "//pw_string", |
| 53 | ], |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 54 | ) |
| 55 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 56 | pw_cc_test( |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 57 | name = "type_to_string_test", |
| 58 | srcs = ["type_to_string_test.cc"], |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 59 | deps = ["//pw_string"], |
| 60 | ) |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 61 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 62 | pw_cc_test( |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 63 | name = "string_builder_test", |
| 64 | srcs = ["string_builder_test.cc"], |
| 65 | deps = [ |
| 66 | "//pw_string", |
| 67 | ], |
| 68 | ) |
| 69 | |
| 70 | pw_cc_test( |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 71 | name = "to_string_test", |
| 72 | srcs = ["to_string_test.cc"], |
Rob Mohr | 905d628 | 2019-11-18 14:24:30 -0800 | [diff] [blame] | 73 | deps = [ |
| 74 | "//pw_status", |
| 75 | "//pw_string", |
| 76 | ], |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 77 | ) |
Rob Mohr | 3895a12 | 2019-12-02 11:49:18 -0800 | [diff] [blame] | 78 | |
| 79 | pw_cc_test( |
| 80 | name = "util_test", |
| 81 | srcs = ["util_test.cc"], |
| 82 | deps = ["//pw_string"], |
| 83 | ) |