Skip to content

Commit 2e38eed

Browse files
authored
Write assertions as (actual, expected)
1 parent 4d50e3c commit 2e38eed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,11 @@ mod unix_tests {
268268
std::fs::set_permissions(f, Permissions::from_mode(0)).unwrap();
269269
let chmod = Command::new("chmod").arg(chmod_to).arg(f).output().unwrap();
270270
println!("chmod {:#?}", chmod);
271-
assert_eq!(expect_mode, to_string(file_mode(f)));
271+
assert_eq!(to_string(file_mode(f)), expect_mode);
272272
// For good measure, also compare against ls
273273
let ls = Command::new("ls").arg("-l").arg(f).output().unwrap();
274274
println!("{:#?}", ls);
275-
assert_eq!(Ok(expect_mode), std::str::from_utf8(&ls.stdout[0..10]));
275+
assert_eq!(std::str::from_utf8(&ls.stdout[0..10]), Ok(expect_mode));
276276
}
277277

278278
#[test]

0 commit comments

Comments
 (0)