Commit e7f734ab authored by Matt Swartwout's avatar Matt Swartwout Committed by Commit Bot

Mock WriteAuth so that it can be used in tests.

Bug: None
Test: None
Change-Id: Ib19c2d505e63522ac1c2c1798c2de37a5afa53d1
Reviewed-on: https://chromium-review.googlesource.com/c/1303035Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Matt Swartwout <mwswartwout@google.com>
Cr-Commit-Position: refs/heads/master@{#603197}
parent f27206fa
...@@ -39,10 +39,16 @@ class MockRemoteCharacteristic : public RemoteCharacteristic { ...@@ -39,10 +39,16 @@ class MockRemoteCharacteristic : public RemoteCharacteristic {
std::move(callback).Run(res.first, std::move(res.second)); std::move(callback).Run(res.first, std::move(res.second));
} }
MOCK_METHOD3(WriteAuth,
bool(bluetooth_v2_shlib::Gatt::Client::AuthReq auth_req,
bluetooth_v2_shlib::Gatt::WriteType write_type,
const std::vector<uint8_t>& value));
void WriteAuth(bluetooth_v2_shlib::Gatt::Client::AuthReq auth_req, void WriteAuth(bluetooth_v2_shlib::Gatt::Client::AuthReq auth_req,
bluetooth_v2_shlib::Gatt::WriteType write_type, bluetooth_v2_shlib::Gatt::WriteType write_type,
const std::vector<uint8_t>& value, const std::vector<uint8_t>& value,
StatusCallback callback) override {} StatusCallback callback) override {
std::move(callback).Run(WriteAuth(auth_req, write_type, value));
}
MOCK_METHOD1(Write, bool(const std::vector<uint8_t>& value)); MOCK_METHOD1(Write, bool(const std::vector<uint8_t>& value));
void Write(const std::vector<uint8_t>& value, void Write(const std::vector<uint8_t>& value,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment