More dependencies and test instead of run

This commit is contained in:
Lennard Kittner
2023-06-13 13:18:53 +02:00
parent 7d934aeccf
commit 06954a94e9
2 changed files with 16 additions and 8 deletions

View File

@@ -16,4 +16,13 @@ fn main() {
}
};
println!("Battery level: {}%", battery_level);
}
#[test]
fn test_basic_device_access() {
let mut device = match Device::new() {
Ok(device) => device,
Err(error) => return
};
device.update_battery_level();
}