More dependencies and test instead of run
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user