• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 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_test",
18)
19
20package(default_visibility = ["//visibility:public"])
21
22licenses(["notice"])
23
24cc_library(
25    name = "pw_result",
26    srcs = ["public/pw_result/internal/result_internal.h"],
27    hdrs = ["public/pw_result/result.h"],
28    includes = ["public"],
29    deps = [
30        "//pw_assert",
31        "//pw_status",
32    ],
33)
34
35cc_library(
36    name = "expected",
37    srcs = ["public/pw_result/internal/expected_impl.h"],
38    hdrs = ["public/pw_result/expected.h"],
39    includes = ["public"],
40)
41
42pw_cc_test(
43    name = "result_test",
44    srcs = ["result_test.cc"],
45    deps = [
46        ":pw_result",
47        "//pw_status",
48        "//pw_unit_test",
49    ],
50)
51
52pw_cc_test(
53    name = "expected_test",
54    srcs = ["expected_test.cc"],
55    deps = [
56        ":expected",
57        "//pw_unit_test",
58    ],
59)
60
61pw_cc_test(
62    name = "statusor_test",
63    srcs = ["statusor_test.cc"],
64    deps = [
65        ":pw_result",
66        "//pw_status",
67        "//pw_unit_test",
68    ],
69)
70