Skip to content

Commit 60946b7

Browse files
authored
Merge pull request #1038 from xanathar/pr/macos-unit-tests
Fixed unit tests under macOS and possibly other *nix flavors
2 parents 7b79419 + c1057ec commit 60946b7

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

gio/src/socket.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -925,12 +925,7 @@ mod tests {
925925

926926
let mut fds = [0 as libc::c_int; 2];
927927
let (out_sock, in_sock) = unsafe {
928-
let ret = libc::socketpair(
929-
libc::AF_UNIX,
930-
libc::SOCK_STREAM | libc::SOCK_CLOEXEC,
931-
0,
932-
fds.as_mut_ptr(),
933-
);
928+
let ret = libc::socketpair(libc::AF_UNIX, libc::SOCK_STREAM, 0, fds.as_mut_ptr());
934929
if ret != 0 {
935930
panic!("{}", io::Error::last_os_error());
936931
}

glib/src/translate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,10 +2812,10 @@ mod tests {
28122812
// gives us useful results
28132813
let dir_1 = tmp_dir.join("abcd");
28142814
fs::create_dir(&dir_1).unwrap();
2815-
assert_eq!(crate::path_get_basename(&dir_1), Path::from("abcd"));
2815+
assert_eq!(crate::path_get_basename(&dir_1), Path::new("abcd"));
28162816
assert_eq!(
28172817
crate::path_get_basename(dir_1.canonicalize().unwrap()),
2818-
Path::from("abcd")
2818+
Path::new("abcd")
28192819
);
28202820
assert_eq!(
28212821
crate::path_get_dirname(dir_1.canonicalize().unwrap()),

0 commit comments

Comments
 (0)