Skip to content

Commit

Permalink
use assert_eq instead of x == y. Better output in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Mar 23, 2022
1 parent 1cd72a6 commit ba83e5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/by-util/test_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ fn test_install_copy_then_compare_file() {
file2_meta = at.metadata(file2);
let after = FileTime::from_last_modification_time(&file2_meta);

assert!(before == after);
assert_eq!(before, after);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_printenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ fn test_get_var() {
.succeeds();

assert!(!result.stdout_str().is_empty());
assert!(result.stdout_str().trim() == "VALUE");
assert_eq!(result.stdout_str().trim(), "VALUE");
}
2 changes: 1 addition & 1 deletion tests/by-util/test_touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ fn test_touch_mtime_dst_succeeds() {

let target_time = str_to_filetime("%Y%m%d%H%M", "202103140300");
let (_, mtime) = get_file_times(&at, file);
assert!(target_time == mtime);
assert_eq!(target_time, mtime);
}

// is_dst_switch_hour returns true if timespec ts is just before the switch
Expand Down

0 comments on commit ba83e5e

Please sign in to comment.