Skip to content

Commit 0adcaca

Browse files
committed
Update tests
1 parent 6d47225 commit 0adcaca

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

tests/unit/out/refcount/socket_transparent_union.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ fn main_0() -> i32 {
1414
let ssloc: Value<libc::sockaddr_storage> = Rc::new(RefCell::new(unsafe { std::mem::zeroed() }));
1515
let slen: Value<u32> = Rc::new(RefCell::new((128usize as u32)));
1616
assert!(
17-
((({
18-
let result: i32 = todo!("getsockname is not implemented yet");
19-
result
20-
} == -1_i32) as i32)
17+
(((libc::getsockname(
18+
(*fd.borrow()),
19+
(ssloc.as_pointer()).reinterpret_cast::<libc::sockaddr>(),
20+
(slen.as_pointer())
21+
) == -1_i32) as i32)
2122
!= 0)
2223
);
2324
let sin: Value<::libc::sockaddr_in> = Rc::new(RefCell::new(unsafe { std::mem::zeroed() }));
2425
let inlen: Value<u32> = Rc::new(RefCell::new((16usize as u32)));
2526
assert!(
26-
((({
27-
let result: i32 = todo!("getsockname is not implemented yet");
28-
result
29-
} == -1_i32) as i32)
27+
(((libc::getsockname(
28+
(*fd.borrow()),
29+
(sin.as_pointer()).reinterpret_cast::<libc::sockaddr>(),
30+
(inlen.as_pointer())
31+
) == -1_i32) as i32)
3032
!= 0)
3133
);
3234
return 0;

tests/unit/socket_transparent_union.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// panic: refcount
1+
// no-compile: refcount
22
#define _GNU_SOURCE
33
#include <assert.h>
44
#include <netinet/in.h>

0 commit comments

Comments
 (0)