Added function stubs
parent
777654b574
commit
b290c924a8
|
@ -32,13 +32,40 @@ pub fn validate(verbosity: u8, config: util::config::Config) {
|
|||
// - check if either file is in the invalid list
|
||||
// - add to the notification queue
|
||||
let mut in_to_out: (Vec<(PathBuf, PathBuf)>, Vec<PathBuf>) = map_files(in_files, out_files);
|
||||
let invalid: Vec<(PathBuf, PathBuf)> = check_files(in_to_out[0]);
|
||||
let invalid: Vec<(PathBuf, PathBuf)> = check_mappings(in_to_out.0, in_suffix, out_suffix);
|
||||
|
||||
print_invalid_mappings(in_to_out[1]);
|
||||
print_unmached(in_to_out.1);
|
||||
print_invalid_pairs(invalid);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Maps input files to output files based on their stem
|
||||
*
|
||||
* @param in_files: The test input files
|
||||
* @param out_files: The test output files
|
||||
*
|
||||
* @return A tuple of two elements:
|
||||
* - A vector containing the file mappings from input to output (if found)
|
||||
* - A vector containing paths for which a match was not found
|
||||
*/
|
||||
fn map_files(in_files: Vec<PathBuf>, out_files: Vec<PathBuf>) -> (Vec<(PathBuf, PathBuf)>, Vec<PathBuf>) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Checks that a given mapping is valid, containing the correct suffixes
|
||||
*
|
||||
* @param mappings between two files
|
||||
* @param the expected in_suffix
|
||||
* @param the expected out_suffix
|
||||
*
|
||||
* @return A vector of tuples with (input, output) PathBufs
|
||||
*/
|
||||
fn check_mappings(mappings: Vec<(PathBuf, PathBuf)>, in_suffix: &str, out_suffix: &str) -> Vec<(PathBuf, PathBuf)> {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Collects paths with invalid suffixes
|
||||
*
|
||||
|
@ -110,6 +137,25 @@ fn print_invalid_suffixes(files: Vec<PathBuf>, exp: &str) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utility function to pring unmatched files
|
||||
*
|
||||
* @param unmatched: Unmatched files
|
||||
*/
|
||||
fn print_unmached(unmatched: Vec<PathBuf>) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utility function to print invalid pairs
|
||||
*
|
||||
* @param invalid: A vector of invalid pairs
|
||||
*/
|
||||
fn print_invalid_pairs(invalid: Vec<(PathBuf, PathBuf)>) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use rstest::{fixture, rstest};
|
||||
|
|
Loading…
Reference in New Issue