Added basis for unit tests. Noted required unit tests to imlpement.

This commit is contained in:
Cutieguwu
2025-02-20 20:33:46 -05:00
parent 35299f3675
commit 58a6cbd689
3 changed files with 87 additions and 13 deletions

View File

@@ -46,20 +46,30 @@ impl Recover {
}
/// Recover media from blank slate.
pub fn run_full(self) {}
/// Recover media given a partial recovery.
pub fn run_limited(self) {}
pub fn run(&mut self) -> &mut Self {
self
}
/// Attempt to copy all untested blocks.
fn copy_untested(self) {
fn copy_untested(&mut self) -> &mut Self {
self
}
/// Set buffer capacities as cluster length in bytes.
/// Varies depending on the recovery stage.
fn set_buf_capacity(&mut self) {
fn set_buf_capacity(&mut self) -> &mut Self {
self.buf_capacity = (self.config.sector_size * self.config.cluster_length) as usize;
self
}
}
#[cfg(test)]
#[allow(unused)]
mod tests {
use super::*;
// Test for Recover::set_buf_capacity
}