Skip to content

Commit 71f327c

Browse files
committed
Delete unportable test part
1 parent a89ebad commit 71f327c

3 files changed

Lines changed: 0 additions & 7 deletions

File tree

‎tests/unit/ifaddrs.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include <assert.h>
2-
#include <errno.h>
32
#include <ifaddrs.h>
43
#include <net/if.h>
54
#include <netinet/in.h>
@@ -36,8 +35,6 @@ int main(void) {
3635
assert(found_loopback);
3736
freeifaddrs(list);
3837

39-
errno = 0;
4038
assert(if_nametoindex("cpp2rust_no_such_if") == 0);
41-
assert(errno == ENODEV);
4239
return 0;
4340
}

‎tests/unit/out/refcount/ifaddrs.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ fn main_0() -> i32 {
145145
__cur = __next;
146146
}
147147
};
148-
libcc2rs::cpp2rust_errno().write(0);
149148
assert!(
150149
(((match nix::net::if_::if_nametoindex(
151150
Ptr::from_string_literal(b"cpp2rust_no_such_if")
@@ -160,6 +159,5 @@ fn main_0() -> i32 {
160159
} == 0_u32) as i32)
161160
!= 0)
162161
);
163-
assert!(((((libcc2rs::cpp2rust_errno().read()) == 19) as i32) != 0));
164162
return 0;
165163
}

‎tests/unit/out/unsafe/ifaddrs.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,10 @@ unsafe fn main_0() -> i32 {
8787
}
8888
assert!((found_loopback != 0));
8989
libc::freeifaddrs(list);
90-
(*libcc2rs::cpp2rust_errno_unsafe()) = 0;
9190
assert!(
9291
((((libc::if_nametoindex((c"cpp2rust_no_such_if".as_ptr().cast_mut()).cast_const()))
9392
== (0_u32)) as i32)
9493
!= 0)
9594
);
96-
assert!(((((*libcc2rs::cpp2rust_errno_unsafe()) == (19)) as i32) != 0));
9795
return 0;
9896
}

0 commit comments

Comments
 (0)