[wip] unit tests
- re-added redundant `tests` submodules for good form
This commit is contained in:
parent
22eeada52a
commit
66f59b4b3b
2 changed files with 71 additions and 59 deletions
|
|
@ -109,6 +109,11 @@ impl From<bool> for FileID {
|
|||
}
|
||||
}
|
||||
|
||||
// technically redundant, but kept for refactoring purposes
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn true_makes_valids() {
|
||||
let uri = Uri::from(true);
|
||||
|
|
@ -174,3 +179,4 @@ fn false_makes_invalids() {
|
|||
test_check((&share_id_i, &file_id), is_share_id_i);
|
||||
test_check((&share_id, &file_id_i), is_file_id_i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,14 @@ pub fn create_file(data: &[u8]) -> NamedTempFile {
|
|||
tmp
|
||||
}
|
||||
|
||||
// technically redundant, but kept for refactoring purposes
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[should_panic = "`impl foo for bar` expected: 1, actual: 0"]
|
||||
fn make_check_trait_panic() {
|
||||
check_trait(0, 1, "foo", "bar");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue