X-Git-Url: http://git.code-monkey.de/?p=gps-watch.git;a=blobdiff_plain;f=test%2Flogger_test.rs;fp=test%2Flogger_test.rs;h=a254f505db960e7c35959de6a215185503d69aef;hp=a0308218e85d576a96fc665be73a8d48c39a49ab;hb=c42a04101a5635fb7557ebdf7b5c7f2dbcb12b54;hpb=8131a71527b5279bca9b80aac37596f6264ea2a1 diff --git a/test/logger_test.rs b/test/logger_test.rs index a030821..a254f50 100644 --- a/test/logger_test.rs +++ b/test/logger_test.rs @@ -68,6 +68,19 @@ impl Storage for FakeStorage { Ok(()) } + fn erase(&mut self, address: usize) -> Result<(), Error> { + if (address & 4095) != 0 { + return Err(Error::UnalignedAddress); + } + + for i in 0..4096 { + self.actual[address + i] = 0xff; + } + + Ok(()) + + } + fn clear(&mut self) { self.actual = vec![0xff; MEMORY_SIZE].into_boxed_slice(); }