[bluetooth_connection] Explicit pairing for rp2 (#18166)

This commit is contained in:
J. Nick Koston
2026-08-08 09:51:12 -05:00
committed by GitHub
parent 9cb46aa584
commit 7218aa4803
11 changed files with 209 additions and 10 deletions
@@ -46,6 +46,16 @@ class MinimalConnection : public BLEGattConnection {
void release_services() override {}
};
TEST(BleGattClientContract, PairingDefaultsAreSafeForNonPairingBackends) {
// pair() defaults to not-connected and on_pairing_result() to a no-op, so
// a backend without pairing still answers the client through the dispatch.
MinimalConnection conn;
RecordingListener listener;
conn.set_listener(&listener);
EXPECT_EQ(conn.pair(), GATT_ERR_NOT_CONNECTED);
listener.on_pairing_result(0); // must not crash: default body
}
TEST(BleGattClientContract, MinimalImplementerCompilesAndRoutesEvents) {
MinimalConnection connection;
RecordingListener listener;