1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

chore: use assert_eq! and assert_ne! instead of assert!

Makes intent clearer, and if something fails, prints the values that caused the failure as part of the panic message.
This commit is contained in:
Yuri Astrakhan 2025-04-08 13:25:12 -04:00
parent a77e218a79
commit a27880e8a3
16 changed files with 71 additions and 60 deletions

View file

@ -592,7 +592,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
file2_meta = at.metadata(file2);
let after_install_sticky = FileTime::from_last_modification_time(&file2_meta);
assert!(before != after_install_sticky);
assert_ne!(before, after_install_sticky);
sleep(std::time::Duration::from_millis(100));
@ -608,7 +608,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
file2_meta = at.metadata(file2);
let after_install_sticky_again = FileTime::from_last_modification_time(&file2_meta);
assert!(after_install_sticky != after_install_sticky_again);
assert_ne!(after_install_sticky, after_install_sticky_again);
}
const STRIP_TARGET_FILE: &str = "helloworld_installed";