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