()
| 593 | } |
| 594 | |
| 595 | pub async fn test_read_rssi() { |
| 596 | let peripheral = peripheral_finder::find_and_connect().await; |
| 597 | match peripheral.read_rssi().await { |
| 598 | Ok(rssi) => { |
| 599 | assert!( |
| 600 | rssi < 0 && rssi > -120, |
| 601 | "RSSI should be between -120 and 0 dBm, got {}", |
| 602 | rssi |
| 603 | ); |
| 604 | } |
| 605 | Err(btleplug::Error::NotSupported(_)) => {} |
| 606 | Err(e) => { |
| 607 | panic!("Unexpected error from read_rssi: {:?}", e); |
| 608 | } |
| 609 | } |
| 610 | peripheral.disconnect().await.unwrap(); |
| 611 | } |
| 612 | |
| 613 | pub async fn test_properties_contain_peripheral_info() { |
| 614 | let peripheral = peripheral_finder::find_and_connect().await; |
nothing calls this directly
no test coverage detected