fuchsia_bluetooth/expectation/
host_driver.rs

1// Copyright 2020 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5//! Expectations for the Bluetooth Host Driver (bt-host)
6
7use super::Predicate;
8use crate::over;
9use crate::types::HostInfo;
10
11pub fn name(expected_name: &str) -> Predicate<HostInfo> {
12    let name = Some(expected_name.to_string());
13    over!(HostInfo: local_name, Predicate::equal(name))
14}
15pub fn discovering(discovering: bool) -> Predicate<HostInfo> {
16    over!(HostInfo: discovering, Predicate::equal(discovering))
17}
18pub fn discoverable(discoverable: bool) -> Predicate<HostInfo> {
19    over!(HostInfo: discoverable, Predicate::equal(discoverable))
20}