diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/device.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/device.rs b/tests/device.rs index e40ae12..915bd3a 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -439,6 +439,27 @@ fn get_storage_status(device: Storage) { } #[test_device] +fn get_production_info(device: Storage) { + let info = device.get_production_info().unwrap(); + assert_eq!(0, info.firmware_version_major); + assert!(info.firmware_version_minor != 0); + assert!(info.serial_number_cpu != 0); + assert!(info.sd_card.serial_number != 0); + assert!(info.sd_card.size > 0); + assert!(info.sd_card.manufacturing_year > 10); + assert!(info.sd_card.manufacturing_year < 100); + // TODO: month value is not valid atm + // assert!(info.sd_card.manufacturing_month < 12); + assert!(info.sd_card.oem != 0); + assert!(info.sd_card.manufacturer != 0); + + let status = device.get_status().unwrap(); + assert_eq!(status.firmware_version_major, info.firmware_version_major); + assert_eq!(status.firmware_version_minor, info.firmware_version_minor); + assert_eq!(status.serial_number_sd_card, info.sd_card.serial_number); +} + +#[test_device] fn export_firmware(device: Storage) { assert_eq!( Err(CommandError::WrongPassword), |