diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-04-04 19:07:45 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-04-04 19:07:45 +0200 |
| commit | 8256ac104405400a15aa9a6a2d9afe38a552a98b (patch) | |
| tree | 4f95380fbe41be46edbaeedcbb4ef0054d3aa8a7 /embassy-boot | |
| parent | 54b82d99666c35e63dc402955068557ef0bb1cf0 (diff) | |
Use MemFlash::default() in sha1 verify test
Diffstat (limited to 'embassy-boot')
| -rw-r--r-- | embassy-boot/boot/src/firmware_updater.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-boot/boot/src/firmware_updater.rs b/embassy-boot/boot/src/firmware_updater.rs index 819e20201..fffb9a500 100644 --- a/embassy-boot/boot/src/firmware_updater.rs +++ b/embassy-boot/boot/src/firmware_updater.rs | |||
| @@ -519,14 +519,14 @@ mod tests { | |||
| 519 | use sha1::{Digest, Sha1}; | 519 | use sha1::{Digest, Sha1}; |
| 520 | 520 | ||
| 521 | use super::*; | 521 | use super::*; |
| 522 | use crate::tests::MemFlash; | 522 | use crate::mem_flash::MemFlash; |
| 523 | 523 | ||
| 524 | #[test] | 524 | #[test] |
| 525 | fn can_verify() { | 525 | fn can_verify_sha1() { |
| 526 | const STATE: Partition = Partition::new(0, 4096); | 526 | const STATE: Partition = Partition::new(0, 4096); |
| 527 | const DFU: Partition = Partition::new(65536, 131072); | 527 | const DFU: Partition = Partition::new(65536, 131072); |
| 528 | 528 | ||
| 529 | let mut flash = MemFlash::<131072, 4096, 8>([0xFF; 131072]); | 529 | let mut flash = MemFlash::<131072, 4096, 8>::default(); |
| 530 | 530 | ||
| 531 | let update = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66]; | 531 | let update = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66]; |
| 532 | let mut to_write = [0; 4096]; | 532 | let mut to_write = [0; 4096]; |
