()
| 541 | } |
| 542 | |
| 543 | pub async fn test_read_write_descriptor_roundtrip() { |
| 544 | let peripheral = peripheral_finder::find_and_connect().await; |
| 545 | peripheral_finder::reset_peripheral(&peripheral).await; |
| 546 | let descriptor = super::find_descriptor( |
| 547 | &peripheral, |
| 548 | gatt_uuids::DESCRIPTOR_TEST_CHAR, |
| 549 | gatt_uuids::READ_WRITE_DESCRIPTOR, |
| 550 | ); |
| 551 | let data = vec![0x42, 0x43, 0x44]; |
| 552 | peripheral |
| 553 | .write_descriptor(&descriptor, &data) |
| 554 | .await |
| 555 | .unwrap(); |
| 556 | let read_back = peripheral.read_descriptor(&descriptor).await.unwrap(); |
| 557 | assert_eq!( |
| 558 | read_back, data, |
| 559 | "Descriptor read-back should match written data" |
| 560 | ); |
| 561 | peripheral.disconnect().await.unwrap(); |
| 562 | } |
| 563 | |
| 564 | pub async fn test_descriptor_discovery() { |
| 565 | let peripheral = peripheral_finder::find_and_connect().await; |
nothing calls this directly
no test coverage detected